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

Use total_* memory counters for cgroups #5592

Merged
merged 1 commit into from Mar 12, 2019

Conversation

@vlvkobal
Copy link
Member

vlvkobal commented Mar 10, 2019

Summary

As stated in the kernel documentation for cgroups

An accounting group accumulates the CPU usage of all of its child groups and the tasks directly present in its group.

memory.usage_in_bytes and memory.memsw.usage_in_bytes also contain information about cgroup's own value plus the sum of all hierarchical children's values.

Thus, using memory usage counters for cgroup itself without its children is quite misleading. These counters were replaced therefore by total_* counterparts.

The PR also fixes a Proxmox issue with the incorrect detailed memory usage accounting. A Proxmox cgroup itself is not populated with tasks and includes an ns subdirectory which is a "real" accounting unit. Thus, detailed memory usage counters were always zero.

Fixes #5477

Component Name

cgroups.plugin

@ktsaou
ktsaou approved these changes Mar 11, 2019
Copy link
Member

ktsaou left a comment

looks ok. I did not test it. Please do, before merging.

@cakrit cakrit merged commit 6f0d13f into netdata:master Mar 12, 2019
12 of 13 checks passed
12 of 13 checks passed
Travis CI - Pull Request Build Created
Details
Header rules - netdata No header rules processed
Details
Pages changed - netdata 2 new files uploaded
Details
Redirect rules - netdata No redirect rules processed
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
LGTM analysis: C/C++ No new or fixed alerts
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
Mixed content - netdata No mixed content detected
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
license/cla Contributor License Agreement is signed.
Details
netlify/netdata/deploy-preview Deploy preview ready!
Details
@vlvkobal vlvkobal deleted the vlvkobal:cgroup-memory-usage branch Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.