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

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

On Mon, 2006-06-05 at 19:55 -0400, Sam Drinkard wrote:
> 
> Kai Schaetzl wrote:
> 
> >William L. Maltby wrote on Mon, 05 Jun 2006 18:45:10 -0400:
> >
> >  
> >
> >>24729  127m  32m  15m  4.3  94m evolution
> >>    
> >>
> >
> >It looks to me like top is using a different definition of swap. If you 
> >compare you see that SWAP shows the difference between VIRT and RES almost 
> >exactly. However, if there is no or almost no swap usage how can there be 
> >a difference? Only explanation: it shows what *could* be swapped 
> >immediately without affecting current activity. 
> >Have you tried making it heavily swap and then checked if you see a 
> >difference (whichever)? Theoretically, it shouldn't make a difference as 
> >it doesn't seem to differentiate between "swapped" and "really swapped".
> >
> >Kai
> >  
> >
> Kai,
> 
>     I think you hit the nail on the head.  According to man ps, the swap 
> size shown by ps is exactly what you say.. the amount of memory it would 
> take if the process were swapped out. 

Sam and Kai, it sure sounds plausible. One of the great programming
productivity gains made was "re-use of code", and not just by calling a
module. It could also include physically copying code. Either way, Kai
makes it sound as if top might be using the same code fragment as ps
uses to report swap.

If this were a democracy, Kai's theory wins! ;-)

> <snip sig stuff>

-- 
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/183b2003/attachment-0004.sig>