memuse is a small simple app that does a reasonably good job of showing the "real" memory cost of an application; it accounts the cost of a shared library as divided by the number of users etc etc....
Posted May 4, 2009 8:13 UTC (Mon) by nhippi (subscriber, #34640)
[Link]
After finding out howto rescue this from a .src.rpm and build it, some comments. Per app memory consumption appears to be effectively:
awk '/Pss:/{sum+=$2}END{print sum "kB"}' /proc/$pid/smaps
This makes one wonder why ps/top doesn't support showing Pss themself.
The library section of output appears to be quite short, not showing for example libc or libX11.
Accounting memory usage
Posted May 10, 2009 23:26 UTC (Sun) by vonbrand (subscriber, #4458)
[Link]
Trouble with that idea is that it depends sensitively on the other stuff that is running at the moment. E.g., having no or 20 processes also using glibc at the moment makes quite a difference "on average".