Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] provide more memory statistics (peak rss mainly) #1540

Open
giampaolo opened this issue Jun 19, 2019 · 1 comment
Open

[Linux] provide more memory statistics (peak rss mainly) #1540

giampaolo opened this issue Jun 19, 2019 · 1 comment

Comments

@giampaolo
Copy link
Owner

On Linux right now we read /proc/pid/statm to provide (rss, vms, shared, text, lib, data, dirty) memory metrics. /proc/pid/status provides much more metrics (ref: http://man7.org/linux/man-pages/man5/proc.5.html):

VmPeak:     131168 kB
VmSize:     131168 kB
VmLck:           0 kB
VmPin:           0 kB
VmHWM:       13484 kB
VmRSS:       13484 kB
RssAnon:     10264 kB
RssFile:      3220 kB
RssShmem:        0 kB
VmData:      10332 kB
VmStk:         136 kB
VmExe:         992 kB
VmLib:        2104 kB
VmPTE:          76 kB
VmPMD:          12 kB
VmSwap:          0 kB

Not all of them are useful but VmPeak definitively is. There are 2 problems though:

  • /status provides all metrics of /statm but reading/parsing it is less efficient (around 25%)
  • we may return these new metrics via memory_full_info() method but that relies on /proc/pid/smaps which requires different (higher) privileges
@giampaolo giampaolo self-assigned this Jun 19, 2019
@pmav99
Copy link

pmav99 commented Dec 16, 2020

isn't this a duplicate of #383 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants