On 8/27/2013 4:17 PM, Erick Erickson wrote:
Ok, this whole topic usually gives me heartburn. So I'll just point out
an interesting blog on this from Mike McCandless:
http://blog.mikemccandless.com/2011/04/just-say-no-to-swapping.html
At least tuning swappiness to 0 will tell you whether it's real or phantom.
Of course I'd be trying it on a test machine, not prod!
Due to horror stories about operating systems behaving strangely when
swap is nonexistent, I don't like to completely disable swap. I know
that if it ever actually starts needing swap that performance will be
terrible, but if there is an actual out of memory event and there's no
swap at all, then it will start killing off processes, and it might make
the wrong choice.
I do set swappiness to 0 or 1 on all my machines. I would rather have
less commonly used (and very small, memory-wise) processes on special
purpose servers (sshd, postfix, etc) remain resident and respond quickly.
Thanks,
Shawn