Memory usage questions

Panos Tsirigotis panos at tigger.Colorado.EDU
Thu May 9 07:53:40 AEST 1991


In article <1991May8.170752.13521 at Think.COM> barmar at think.com writes:
>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).

SZ <= amount of swap space used because of dynamic linking. The text segment
is mapped in from the object file using MAP_PRIVATE mapping. Then
ld.so does the linking causing some pages to change causing copy-on-write's.
The changed pages will be backed up in the swap space. The non-changed
pages will be backed up by the object file.

Panos

-- 
----------------------------------------------------
| Panos Tsirigotis, CS grad                        |
| Computer Science Dept., U. of Colorado @ Boulder |
| Boulder, CO 80309                                |



More information about the Comp.unix.admin mailing list