For testing, I've created a VM on a KVM node with 54MB of RAM. Running Debian Squeeze 64Bit. I've created around 2GB of SWAP (on a RAID 10 SSD array of 16 drives).
I've installed apache2 then ran ab -kc 1000 -t 30 http://localhost/
After it used all the memory except the last 1 MB, it started using the SWAP area. The vm.swappiness = 100
It used 54MB of SWAP and started to kill the processes, and after a while it returned a kernel panic.
I'm confused here, why it didn't use all the swap instead an exact amount of installed RAM?
I was typing free -m at the process of this, and when it started killing processes the free -m looked like this:
[email protected]:~# free -m
total used free shared buffers cached
Mem: 54 53 1 0 0 2
-/+ buffers/cache: 51 3
Swap: 1875 54 1821
Cheap VPS - VPSDime