2

I'm tryng to stress a web server with requests, I used vmstat to get the memory usage of the server, but I don't understand few things.

  1. When the requests start, the free memory decreases and the swpd increases, but after a while, even if the requests continue at the same rate, the free memory goes up. I think it's because the system goes out of free memory, or at least to avoid that before it's to late, allocates new memory with swap memory, am I right?
  2. Is there a way to limit the swap memory allocation?

Memory Usage Compared

1 Answers1

2
  1. No: Free memory is unused memory: you're not going out of memory at all.
  2. It's possible, but a bad idea: the kernel knows better than you when to use swap... ;-)

For more information on how the kernel uses memory, have a look here.

Fabby
  • 35,017