One of my servers is crashing once in a few days.

It does web serving + some background jobs like XML file processing.

If you look at the screenshot http://awesomescreenshot.com/075xmd24 you'll see that the server swaps although it has lots of free memory. Why does this happen? Why doesn't the OS use the free mem instead of swapping ?

The web serving is low traffic (maybe it has high load when google crawls it)

Server details: Ubuntu 11.10 oneiric i386 scalarizr (0.7.185) python 2.7.2, chef 0.10.8, mysql 5.1.58, apache 2.2.20, php 5.3.6, memcached 1.4.7 Amazon EC2 (us-west-1)


1 Answer 1


The kernel swaps less active pages proactively, instead of needing to do reactive swapping when physical RAM is completely full and an application needs to be blocked waiting for memory to be freed via swapping.

You can mess with the swappiness kernel parameter, but do not do so unless the swapping behavior is causing problems - with additional evidence, there's no reason to assume that the use of swap is related to the crashing in any way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .