Swap file priority "-1"


(Jonathan Hosein) #1

Installing my first instance of Discourse. (woo!)

Just finished creating my swapfile and I noticed that the priority is β€œ-1”. Is that normal?


(Jeff Atwood) #2

Not from our instructions! Our instructions say:

echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab sysctl -w vm.swappiness=10

note swappiness = 10 there

The default value is apparently 60, and I can confirm that’s true in Ubuntu 14, but it does also say

With kernel version 3.5 and over, as well as kernel version 2.6.32-303 and over, it is likely better to use 1 for cases where 0 used to be optimal.