"Excuse me please. My ear is full of milk..."

– Oliver Hardy, Going Bye Bye (1934)

Skip on down to the menu.

Set swappiness factor for kernel.


From http://kerneltrap.org/node/3000

A number of Linux kernel developers recently debated "swapiness" at length on the lkml, exploring when an application should or should not be swapped out, versus reclaiming memory from the cache. Fortunately a run-time tunable is available through the proc interface for anyone needing to adapt kernel behavior to their own requirements. To tune, simply echo a value from 0 to 100 onto /proc/sys/vm/swappiness. The higher a number set here, the more the system will swap.

View current swappiness factor

To view the current swappiness factor run this as root.

cat /proc/sys/vm/swappiness

Change swappiness factor

echo 10 > /proc/sys/vm/swappiness

Change the 10 above to whatever you want.

Making the change permanent

This is made permanent by adding "vm.swappiness=10" to "/etc/sysctl.conf"

2007-10-04, T. Sneddon