-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add proportional resident memory size #142
Conversation
Updated to drop the replace in go.mod. I've kept the toggle flag, but the CPU cost if now much lower since procfs use smaps_rollup. I've run three process-exporter with and without the -gather-smaps flag and the last is before using smaps_rollup (e.g. using prometheus/procfs#281) :
Note that the last case should occur with older Linux kernel that don't implement smaps_rollup (before 4.15.x). |
This looks great, thanks! Please merge in master, then we can merge this and I'll build a new release. |
Rebased (cherry-picked) the commit on master and fixed the two comment. Hope it's this way you though the options struct. |
Thanks again @PierreF! |
I can't build a release yet because some target platforms aren't supported by the tip of procfs (see prometheus/procfs#294, https://app.circleci.com/pipelines/github/ncabatoff/process-exporter/8/workflows/97bdbcfe-2b97-464e-b846-60d327641e2f/jobs/57) but I'll keep an eye on it and hopefully have one out this week. |
This PR fix #140 by adding two additional memory_bytes memtype:
I've added a command flag to enable/disable smaps information gathering as this cause notable CPU impact (when gathering all 480 processes - and 3000 threads - on my laptop: without process-exporter consume ~9% of CPU, with it consume ~30% of CPU). It's disabled by default.
Edit: updated to use prometheus/procfs/pull/286. This has much lower CPU impact.
Edit: It still include #141 so it may be merged after #141 (or supersede it).
This is WIP because:* It include #141 which should be merged before (or #141 declined and only this one merged)* It rely on prometheus/procfs#280 and prometheus/procfs#281. Before those PRs are merged, it's using my own fork of procfs.I'll update this PR when other PRs get merged.