On Fri, 2005-11-04 at 08:35, Andrei Dorofeev wrote: > Hi Mike, > > > processes are counted multiple times. In an extreme example of a busy > > 15k domain with hundreds of gigabytes of physical RAM and less than 50 > > GB swap, "prstat -a" will report that many terabytes of memory are in > > the resident set for the oracle user. This is impossible. > > About the only thing prstat could do today about this is to read > /proc/pic/map files and go through all memory segments for each > process looking for processes using the same pr_shmid (see proc(4)). > That will slow down prstat and yet won't not be 100% accurate as > there are other types of shared memory (shared libc text, for example).
However, there is one case in which prstat could be improved. While the prstat -a output simply adds the memory of each process, if you use prstat -aL it simply adds things up by LWP so the memory usage gets multiplied by the number of LWPs in the process. eg: NPROC USERNAME SIZE RSS MEMORY TIME CPU 2 apache 708M 534M 5.0% 1:27:31 6.7% 30 oracle 11G 9915M 93% 0:11:31 6.0% 50 root 138M 84M 0.7% 8:18:21 0.7% NLWP USERNAME SIZE RSS MEMORY TIME CPU 123 apache 84G 63G 55% 0:50:06 7.1% 156 oracle 59G 52G 45% 0:11:16 5.7% 122 root 447M 323M 0.3% 8:18:16 0.7% In this case the apache user is running a single, but rather large, java process. (Just looking at this, I'm not sure why the TIME is so different.) -- -Peter Tribble L.I.S., University of Hertfordshire - http://www.herts.ac.uk/ http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/ _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org