CurrentProcessMetrics: MemoryResident on Linux probably should not include shared memory pages (e.g. system file cache)
iloktionov opened this issue · 1 comments
I agree that we shouldn't include shared memory pages in this metric, because they don't provide very useful info about application memory usage.
Having RssAnon
instead of VmRSS
is informative enough.
Of course, if we could calculate RssAnon
+ something like shared that is used by no one but me
metric it would be more useful, but there is no easy way to calculate this.
There is also a metric called PSS
. It looks much more useful, and can be retrieved in /proc/[pid]/smaps
.
But the doc placed a warning under /proc/[pid]/statm
:
"Some of these values are inaccurate because of a kernel-internal scalability optimization.
If accurate values are required, use /proc/[pid]/smaps
or /proc/[pid]/smaps_rollup
instead, which are much slower but provide accurate, detailed information."
So I think that the game is not worth the candle, and we should just use RssAnon
instead of VmRSS
.