Search This Blog

Thursday, February 10, 2011

Force Ubuntu not to use swap

My server had 24GB of RAM and only 20GB were used. Despite this Ubuntu was using 1GB of swap. 
You can force Linux not use swap by setting a parameter called swappiness.
Set swappiness by adding "vm.swappiness=x" (between 0 and 100) to /etc/sysctl.conf. If set to 0, swap is turned off.

More info: https://help.ubuntu.com/community/SwapFaq

No comments:

Post a Comment

If you like this post, please leave a comment :)