Re: [SLUG] amount of allocated memory that's swapped out

From: Ronan Heffernan (ronanh@auctionsolutions.com)
Date: Tue Mar 16 2004 - 14:42:43 EST


Eben King wrote:

>How can I find how much memory allocated to a process is swapped out? Or
>is the only way to kill the process and see how much swap usage goes down?
>I run W2K inside of VMware, and VMware (according to top) is currently
>using 162 MB (out of 768 MB). Often, tasks take a long time to start in
>VMware (raise a menu, start a process, etc.), but once started, proceed at
>normal speed. I think that's because VMware is partially swapped out,
>which in turn is because I don't have enough RAM. I suppose I could infer
>which "memory" accesses are really swap reads by the time taken for them.
>
>When W2K accesses part of its 600 MB of real (it thinks) RAM, part of that
>RAM has been swapped out by the host OS. Had it been swapped out by W2K,
>presumably W2K could've optimized things so it acted better.
>
>Should I lower VMware's memory allocation to match what it really gets in
>the mean time?
>
>
>
I think that you can tell how much of a processes' memory is swapped-out
by subtracting RSS from SIZE (SIZE is the total memory for the process
and RSS is the portion of memory that is not swapped-out (Resident Set
Size???). Note that there is a small discrepency that you probably don't
care about (from the man page for 'top'):

The SIZE and RSS fields don't count the page tables and the task_struct
of a process;
this is at least 12K of memory that is always resident. SIZE is the
virtual size of the process
(code+data+stack).

--ronan

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:21:02 EDT