How to manage the use of swap memory
Follow @ggarronThe 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