News‎ > ‎

Setting Swappiness in Ubuntu

posted Jun 24, 2015, 7:08 PM by Ron Cotton
vm.swappiness is a parameter in sysctl.conf, most installs will set vm.swappiness=60.  In reality, if you have 4GB or more, a vm.swappiness of 10 or less would probably be optimal, even if you have an SSD drive (more write cycles on SSD, not a good idea).  Note that setting vm.swappiness=0 disables the swap completely.  Changing this parameter in sysctl.conf requires reboot, unless you want a temporary change until reboot: sysctl vm.swappiness=10.  If you want to clear the swap parition and place that back into ram the ram, run sudo swapoff -a && swapon -a.
Comments