-
Notifications
You must be signed in to change notification settings - Fork 156
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 v2 and its unified hierarchy #21
Comments
So at a basic / short term level, yes this library can and should support cgroups v2. Longer term however, we'd like to get mainline support for correctly setting GOMAXPROCS within a container golang/go#33803 and deprecate this library. |
Merged
abhinav
added a commit
that referenced
this issue
Apr 5, 2022
Add support for setting GOMAXPROCS based on CPU allotment in a system with cgroups v2. This works by adding a new internal CGroups2 type that is able to provide the CPU quota if the system is using cgroups v2. In the main GOMAXPROCS assignment logic, we use this variant if we're able to, falling back to the v1 version if not. Resolves #21 Co-authored-by: Abhinav Gupta <abg@uber.com> Co-authored-by: Matt Way <mway@uber.com>
Was going to reopen because the v2 support was broken, but looks like we already have #49. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems from the code that this only consults the v1 cgroup and its specific subsystem. It seems that more and more code will move to using v2 cgroups and the unified hierarchy. I'm creating this issue to track support for v2 cgroups.
The text was updated successfully, but these errors were encountered: