[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: top swap interpretation help?



Dave Stevens wrote:
current example:

top - 16:14:05 up 10 days, 43 min,  1 user,  load average: 0.04, 0.13, 0.16
Tasks: 197 total,   3 running, 194 sleeping,   0 stopped,   0 zombie
Cpu(s):  5.3%us,  4.1%sy,  0.2%ni, 90.0%id,  0.0%wa,  0.3%hi,  0.0%si,  0.0%st
Mem:   4129236k total,  3817620k used,   311616k free,   332628k buffers
Swap:  2031608k total,       84k used,  2031524k free,  1446812k cached

So this shows 2 gigs of swap with 84K used. Fine, But it doesn't show the 84K in use right after boot time and in fact only shows up after there's been some especially heavy use of the machine. But it seems to be a kind of high-water mark. When the level of machine use goes down, even way down, the swap still shows as being in use and at the same level. I find this counter-intuitive and think I may be misunderstanding the figure.

It's the amount currently in use.  What you are seeing in swap are those
pages that got written once when you booted and logged in and were never
referenced again, thus no reason to bring them back in from swap.  You
can run "swapoff -a; swapon -a" to force them back in, but eventually
those same pages are going to end up in swap again, even with little
memory pressure.

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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]