|
Home > Archive > Unix Shell > October 2006 > Process memory requirement = Size + Resident Memory??
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Process memory requirement = Size + Resident Memory??
|
|
| qazmlp1209@rediffmail.com 2006-10-19, 1:25 am |
| 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?
| |
| Barry Margolin 2006-10-19, 1:25 am |
| In article <1161229073.582449.255040@b28g2000cwb.googlegroups.com>,
qazmlp1209@rediffmail.com wrote:
> 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?
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, barmar@alum.mit.edu
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 ***
| |
| victorfeng1973@yahoo.com 2006-10-19, 1:21 pm |
|
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
|
|
|
|
|