Process memory requirement = Size + Resident Memory??

Process memory requirement = Size + Resident Memory??

Post by qazmlp120 » Fri, 20 Oct 2006 12:37:53


We have to find out the total memory requirement for a process. As I
checked in the 'top' the memory consumption (when the process is
handling the peak load possible), it shows the following:
Size: 650 MB
RES(Resident Stack): 100 MB

Which figure I should take it as the memory requirement for the given
process? Size+RES or Size?
 
 
 

Process memory requirement = Size + Resident Memory??

Post by Barry Marg » Fri, 20 Oct 2006 13:06:16

In article < XXXX@XXXXX.COM >,



Size is the total amount of virtual memory being used by the process.
Res is the size of the portion that's currently in physical RAM.

Note that shared libraries (and other uses of shared memory) mean that
some portion of each number is not actually unique to that process. The
memory (both virtual and resident) used to hold the C runtime library,
for instance, is included in just about every process.

--
Barry Margolin, XXXX@XXXXX.COM
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

 
 
 

Process memory requirement = Size + Resident Memory??

Post by victorfeng » Fri, 20 Oct 2006 23:27:09


Since so many processes share memory(library), you can use pmap to
estimate the additional physical memory that next similar process will
tak.

feng@host> ps -o pid,rss,vsz,comm
PID RSS VSZ COMMAND
5759 1888 2592 -bash
6154 864 1120 ps
feng@host> pmap -x 5759
5759: -bash
Address Kbytes RSS Anon Locked Mode Mapped File
00010000 496 480 - - r-x-- bash
0009A000 80 80 24 - rwx-- bash
000AE000 144 144 48 - rwx-- [ heap ]
FF100000 688 680 - - r-x-- libc.so.1
FF3EE000 8 8 8 - rwx-- ld.so.1
FF3F0000 8 8 8 - rwx-- ld.so.1
FF3FA000 8 8 8 - rwx-- libdl.so.1
FFBFC000 16 16 8 - rw--- [ stack ]
-------- ------- ------- ------- -------
total Kb 2592 2456 112 -

The Anon 112 is the addition.

Victor