Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is indeed absurd, when swapping can be avoided entirely by setting kernel swappiness to 0:

sysctl -w vm.swappiness=0

to make permanent, set vm.swappiness=0 in /etc/sysctl.conf

Though for a desktop machine, disabling swap probably won't help improve performance



That's true, but this was a special circumstance where disabling swap was creating very bad system behavior.


pre 3.5 it doesn't actually disable swap, it will only use it when it's about to OOM.

post 3.5 it does actually hard-disable, but setting swappiness to 1 gives the same behaviour as swappiness=0 in < 3.5


That's good to know, thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: