Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.unix.aix Frequently Asked Questions (Part 2 of 5)
Section - 1.301: How much should I trust the ps memory reports?

( Part1 - Part2 - Part3 - Part4 - Part5 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Property taxes ]


Top Document: comp.unix.aix Frequently Asked Questions (Part 2 of 5)
Previous Document: 1.300: Some info about the memory management system
Next Document: 1.302: Which simms do RS6000's use?
See reader questions & answers on this topic! - Help others by sharing your knowledge

Using "ps vg" gives a per process tally of memory usage for each running
process.  Several fields give memory usage in different units, but these
numbers do not tell the whole story on where all the memory goes.

First of all, the man page for ps does not give an accurate description
of the memory related fields.  Here is a better description:

RSS - This tells how much RAM resident memory is currently being used
for the text and data segments for a particular process in units of
kilobytes.  (this value will always be a multiple of 4 since memory is
allocated in 4 KB pages).

%MEM - This is the fraction of RSS divided by the total size of RAM for
a particular process.  Since RSS is some subset of the total resident
memory usage for a process, the %MEM value will also be lower than actual.

TRS - This tells how much RAM resident memory is currently being used
for the text segment for a particular process in units of kilobytes. 
This will always be less than or equal to RSS.

SIZE - This tells how much paging space is allocated for this process
for the text and data segments in units of kilobytes.  If the executable
file is on a local filesystem, the page space usage for text is zero. 
If the executable is on an NFS filesystem, the page space usage will be
nonzero.  This number may be greater than RSS, or it may not, depending
on how much of the process is paged in.  The reason RSS can be larger is
that RSS counts text whereas SIZE does not.

TSIZ - This field is absolutely bogus because it is not a multiple of 4
and does not correlate to any of the other fields.

These fields only report on a process text and data segments.  Segment
size which cannot be interrogated at this time are:

       Text portion of shared libraries (segment 13)

       Files that are in use. Open files are cached in memory as
       individual segments.  The traditional kernel cache buffer
       scheme is not used in AIX 3.

       Shared data segments created with shmat.

       Kernel segments such as kernel segment 0, kernel extension
       segments, and virtual memory management segments.

Speaking of kernel segments, the %MEM and RSS report for process zero
are totally bogus for AIX 3.1.  The reason why RSS is so big is that the
kernel segment zero is counted twice.  For AIX 3.2, this has been
changed, but the whole story is still not known.  The RSS value for
process 0 will report a very small number of the swapper private data
segment.  It does not report the size of the kernel segment 0, where the
swapper code lives.

In summary, ps is not a very good tool to measure system memory usage. 
It can give you some idea where some of the memory goes, but it leaves
too many questions unanswered about the total usage.

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




Top Document: comp.unix.aix Frequently Asked Questions (Part 2 of 5)
Previous Document: 1.300: Some info about the memory management system
Next Document: 1.302: Which simms do RS6000's use?

Part1 - Part2 - Part3 - Part4 - Part5 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
bofh@mail.teleweb.pt (Jose Pina Coelho)





Last Update March 27 2014 @ 02:11 PM