Memory usage questions

Barry Margolin barmar at think.com
Thu May 9 03:07:52 AEST 1991


In article <1991May8.151630.12279 at DMI.USherb.CA> beauchem at roselin.DMI.USherb.CA (Denis Beauchemin) writes:
>I am trying to compute the amount of main memory used by some processes and I
>don't know exactly what to look at in the ps output.  When I do a "ps aux" I
>get the SZ and RSS fields that detail memory usage.  Is one a subset of the
>other or do I have to add them up to get the real picture?

It's a little more complicated than that.

SZ is the size of the data and stack segments of the process.  This is
basically the amount of swap space that is being used (the text segment is
paged directly out of the object file and shared libraries).

RSS is the Resident Set Size.  This is the amount of physical memory that
is being used by this process, i.e. the number of kbytes that are paged in
from disk (in any segment).  I'm not sure how this accounts for memory
pages that are in use by multiple processes (e.g. multiple processes paging
their text segment from the same binary).
-- 
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.unix.admin mailing list