[CentOS] Swap memory: I can't reconcile this stuff.

Tue Jun 6 01:20:14 UTC 2006
William L. Maltby <BillsCentOS at triad.rr.com>

On Mon, 2006-06-05 at 19:52 -0400, Sam Drinkard wrote:
> 
> William L. Maltby wrote:
> 
> >I need to look more into it, but before I start the long and arduous
> >"googling my life away" process, I figured someone might know the
> >answer. I've read the man pages several times and they didn't change!
> >:-(
> >
> >As normal, while looking at one thing, something else bites my butt. I
> >tuned on the swap field in top and sort on it. Here's an edited snippet
> >of the results.
> >
> >Mem:    775708k total,   764752k used,    10956k free,    60780k buffers
> >Swap:  1572856k total,      160k used,  1572696k free,   377324k cached
> >
> >  PID  VIRT  RES  SHR %MEM SWAP COMMAND
> >24729  127m  32m  15m  4.3  94m evolution
> > 3409 97220 5268 4304  0.7  89m evolution-data-
> ><snip>

> >Now, if I treat all those numbers ending in "m" as megabytes, it doesn't
> >take long to see that I've been lied to somewhere along the way. Or
> >alternatively, I'm dense and "Just Don't Get It" (TM).
> >
> >Any help?
> >  
> >
> Looked at the same top info, and I don't understand what I see either.  
> With processes running, I'm seeing close to 500mb of stuff swapped out, 
> but according to free, only the 2.2 mb is swapped.  There's gotta be 
> more to this than meets the eye, or something is lying about the swap.  
> The system monitor also shows only 2.2mb of swap in use, so where is top 
> getting this 500+ mb of swap data from?

I suspect Kai and Les have hit on it. I first thought it sounded like a
bug, now it may be only a "bug" in documentation not telling it like it
is.

> <snip sig stuff>

I'll tell you one theory I had earlier today. What if the summary line
was reporting "pages" swapped? At 4K/page time 160,000 it cam awful
close to matching the total of all the individual entries under the
"SWAP" column. I had though I was onto something. If someone's on an
arch with other than 4K page size, ...

It was tempting, yes it was. Fortunately, I decided to *ask* rather than
*propose*. So I seem only half as much and idiot as I might have seemed
(I hope)!

-- 
Bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20060605/2cd566f8/attachment-0005.sig>