[CentOS] Memory Usage in Top and System Monitor

Thu Jul 21 00:08:19 UTC 2011
Robert Nichols <rnicholsNOSPAM at comcast.net>

On 07/20/2011 05:27 PM, Michael McNulty wrote:
> Thanks for the replies. I checked free and that makes sense to me now. The only
> thing I cannot figure out is, if there is all this memory available why would
> swap space start building?
> I started checking all this out because the system slowed to a crawl after I
> noticed swap space being used which does not make sense to me if there is
> available memory.
>
> total used free shared buffers cached
> Mem: 8301448 7917100 384348 0 59984 6009248
> -/+ buffers/cache: 1847868 6453580
> Swap: 4128760 1225896 2902864
>
> btw - this is Centos 5.6 box using the PAE kernel. 2.6.18-238.12.1.el5PAE

That indicates that at one time there were processes using a lot of memory,
and 1.2GB got swapped out to satisfy that.  Until something tries to access
those pages they will just sit there in swap.  Whatever process needs those
pages will be a bit slow the next time it wakes up, but since you've got
plento of available memory now those pages should then remain in physical
memory.  The system should not continue to run slow.  If you like, you can
force everything to be paged back in by running (as root) "swapoff -av",
followed by "swapon -av" to re-activate your swap space.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.