> It would be meaningful to see the "shared pages" (or potentially shared,
> shareable?) as a separate count.

We already have a tool that does that: pmap -x. We could extend prstat to 
display anon usage as an option beside RSS so you can tell how much of RSS 
is private memory versus (potentially shared) text and libs. If you think 
that'd be useful feel free to file an RFE on prstat.

I have also heard a suggestion of adding a "PRSS", or private RSS, which 
counts all pages which are resident but singly mapped; i.e. how much 
memory is only mapped by this one process, whether it be shared libs or 
not. Such a beancounter would be more useful for capacity planning than 
RSS or even RSS+ANON, since you could accurately determine how much 
additional memory is required to support moving from M to M+N identical 
processes on the same machine.

> But also, in most cases I've seen, the size of the shared libs pales
> compared to the size of heap consumed.
 >
 > X11 apps certainly have a number of shared libs -- libc ~1Mb, libgtk ~
 > 2.8Mb, etc.  (amd64 figures).  But for the most part  I look at "top"
 > and see  things like Opera at ~97MB, thunderbird ~200M, firefox
 > ~200MB.   I doubt any of those have more than ~20MB of shared libs loaded.
 >

On my amd64 system pmap -x says that Thunderbird is 110M RSS. 23.6M of 
that is anon (23M is the heap the rest is COW pages and stack). The rest 
is text, data and libs. It looks like a pig, but it's sharing most of 
these libraries nicely with Gnome so the added memory footprint to my 
system is actually less than Emacs.

- Eric

Reply via email to