How to manage the use of swap memory
The use of the swap memory by default on Kernel 2.6.xx is set to 60% that means that the system will use intensively the swap memory, this is good if we have a small amount of memory and lot of load on our PC or server, but if we have plenty of RAM or we are using a Desktop machine, we maybe do not need this setting, let's see how to change it.
This is valid for Ubuntu, Debian, Fedora and CentOS
On a Terminal do this as root (use sudo if running Ubuntu)
cat /proc/sys/vm/swappiness
You should see 60, now change it to 10
sysctl -w vm.swappiness=10
Now is time to work for some minutes with some applications if you see that is better, you can make the changes permanent.
vim /etc/sysctl.conf
and add this line at the end (if it does not exist, otherwise edit it)
vm.swappiness=10
Trackback URL for this post:
If you like this article, subscribe to our full rss
Please post your question in our forum and use comments only to leave your comments about the article, thanks.













If I set the swappiness too
If I set the swappiness too high, will background applications stop working? IE. If I put swappiness to 0, can I leave bittorrent running while I search the web?
Post new comment