[CentOS] What is eating up Swap

Thu Dec 12 06:02:40 UTC 2013
Devin Reade <gdr at gno.org>

--On Tuesday, December 10, 2013 08:18:09 AM -0800 John R Pierce
<pierce at hogranch.com> wrote:

> during idle time, dirty pages will be written to swap so they can then 
> be discarded if needed.   ignore it, it means nothing

Agreed.  If you want to see if paging is actually an issue,
run "vmstat -5" and ignore the first line of output.  If, over time,
you're seeing consistently high values for the si and so columns,
then you have something to investigate.  If they're usually
low or zero, then ignore your swap usage.

Same thing goes for the "free" values in top and vmstat; having
low free memory counts in a long running kernel is normal and
can be ignored.  (Too many people, especially coming from the
windows world, get wrapped around the handle about this.)

If you want to maintain a historical record of memory and other
performance indicators that you can use for investigative purposes
after the fact, see the man page for sar(1).

Devin