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 cgroups memory limit detection for cgroups V2 #6894

Closed
gjoseph92 opened this issue Aug 16, 2022 · 1 comment · Fixed by #7051
Closed

Support cgroups memory limit detection for cgroups V2 #6894

gjoseph92 opened this issue Aug 16, 2022 · 1 comment · Fixed by #7051
Labels
enhancement Improve existing functionality or make things work better good first issue Clearly described and easy to accomplish. Good for beginners to the project.

Comments

@gjoseph92
Copy link
Collaborator

In cgroups v2, the memory limit changed from /sys/fs/cgroup/memory/memory.limit_in_bytes to /sys/fs/cgroup/memory.max. For example:

To fix this, let's just replace this with a loop through both files:

with open("/sys/fs/cgroup/memory/memory.limit_in_bytes") as f:

@gjoseph92 gjoseph92 added enhancement Improve existing functionality or make things work better good first issue Clearly described and easy to accomplish. Good for beginners to the project. labels Aug 16, 2022
@shughes-uk
Copy link
Contributor

#7051

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or make things work better good first issue Clearly described and easy to accomplish. Good for beginners to the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants