On 4/23/06, Tao Chen <[EMAIL PROTECTED]> wrote:
> On 4/23/06, Sh <[EMAIL PROTECTED]> wrote:
> > I have some questions about the prstat utility output
> > For example if I do prstat -a:
> > ---cut----
> >   NPROC USERNAME  SIZE   RSS MEMORY      TIME  CPU
> >     40                 wraith    983M  399M    79%   0:48:04  15%
> >     48                  root      201M   90M    18%
> 0:00:28 0,0%
> >      2            daemon     10M      2856K   0,6%   0:00:00 0,0%
> >      5              nobody     42M     6468K   1,3%   0:00:00 0,0%
> >
> >
> > What it meant under 'SIZE' here?Virtual memory size?Real size of RAM
> memory is 512 mb
> > So what is 983 mb here?
>
> From manpage:
>
> SIZE
>     The total virtual memory size of the process,  including all  mapped
> files  and devices ...
>
> RSS
>     The resident set size of the process (RSS) ...

The important thing to remember here is that multiple processes can
(and usually do) map some of the same pages.  The things that fall
into the "usually do" category are shared libraries and executables. 
Nearly everything will have some portion of libc mapped.  In the event
that wraith is running JDS, a huge amount of the RAM is likely tied up
in a bunch of executables mapping libraries like glib, gtk, etc.

>    *Users who want to get more accurate usage information for capacity
> planning  should  use the -x option to pmap(1) instead.*

With this you can look at each process individually to see how much
RAM is being used for the stack and heap - these are the places that
"normal" processes will chew up the RAM.  More sophisticated programs
may be using shared memory segments (which are typically shared among
several programs) and/or memory mapped files (which may or may not be
shared among many programs).

Mike

--
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to