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

Support cgroup version 2 for memory tracing #4412

Open
florian-kuebler opened this issue Nov 17, 2022 · 1 comment
Open

Support cgroup version 2 for memory tracing #4412

florian-kuebler opened this issue Nov 17, 2022 · 1 comment

Comments

@florian-kuebler
Copy link
Collaborator

No description provided.

@florian-kuebler
Copy link
Collaborator Author

Some relevant links:
https://www.kernel.org/doc/Documentation/cgroup-v2.txt
https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt
https://www.usenix.org/system/files/lisa21_slides_down.pdf

To get the basic information (such as pagefaults), we can do the following:

$cat /proc/%PID%/cgroup
0::/A/B/C/D 

$cat /sys/fs/cgroup/A/B/C/D/memory.stat

From there read the fields according to the spec.
Note, that this will give use the info of the inner-most cgroup, which might or might not what the user expects. A detailed description is needed.

However, version 2 drops some fields, like rss, which are not yet clear how to retrieve them.

A simple first version could be to start with the pagefault track.

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

1 participant