I have an Ubuntu 15.04 64bit with 4GB RAM. I do not have a separate swap partition, but a swapfile of 8GB. The system recognizes the swap.
I have tried to set
swappiness to 15 by adding it to the last line of
/etc/sysctl.conf. The last 3 lines of
$cat /etc/sysctl.conf are
# ADDED ON 9JAN16 for swap trial vm.swappiness=15 #
However, when my system starts up, the swappiness value is 1
$ cat /proc/sys/vm/swappiness 1
vm.swappiness changes the value
$ sudo sysctl vm.swappiness=15 vm.swappiness = 15 $ cat /proc/sys/vm/swappiness 15
Swappiness becomes 1 again when I boot up the system next time.
NOTE - I had previously tried to setup hibernation using Debian's tutorial to hibernate without a swap partition and failed. I have removed
uswusp that I had installed for that process. Perhaps there is something in there that is overriding
sysctl.conf, but I am not smart enough to figure it out.
How do I set default value of swappiness to 15?