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

Add cgroup v2 support to .NET Core #30337

Closed
4 tasks done
omajid opened this issue Jul 19, 2019 · 9 comments
Closed
4 tasks done

Add cgroup v2 support to .NET Core #30337

omajid opened this issue Jul 19, 2019 · 9 comments
Labels
area-PAL-coreclr enhancement Product code improvement that does NOT require public API changes/additions os-linux Linux OS (any supported distro) tenet-performance Performance related issue untriaged New issue has not been triaged by the area owner
Milestone

Comments

@omajid
Copy link
Member

omajid commented Jul 19, 2019

The Linux kernel includes a feature called "cgroup" (or "cgroups"). This allows managing - specially limiting - resources (cpu, memory, etc) for a collection of processes. This is one of the underlying technology pieces used by projects like docker, podman, kubernetes and systemd to limit various resources for processes.

The first version of cgroup has a number of design issues and a redesign, cgroup v2, was implemented in the Linux kernel. There are a number of incompatibilities between cgroup v1 and cgroup v2.

Complete documentation of cgroup v2 is available here: https://www.kernel.org/doc/Documentation/cgroup-v2.txt

Both cgroup v1 and cgroup v2 may be enabled on a system at the same time. Container runtimes (podman, docker) will only use one.

Some Linux distributions, such as Fedora, are starting to switch to cgroup v2 as the default: https://fedoraproject.org/wiki/Changes/CGroupsV2. Even where it's not the default, adding systemd.unified-cgroup-hierarchy=1 to the kernel command can be used to make it the default for testing.

A technique to disambiguate between cgroup v1 and cgroup v2 is documented here: https://systemd.io/CGROUP_DELEGATION/#three-different-tree-setups-

Currently, .NET Core doesn't support cgroup v2. This issue is for tracking the changes/fixes required across the different .NET Components.

CoreCLR:

CoreFx:

@carlossanlop
Copy link
Member

Thank you for the details, @omajid and for fixing issue dotnet/corefx#39633. Based on this, I will move this issue to the corefx repo, for better tracking and higher visibility.

@carlossanlop carlossanlop transferred this issue from dotnet/core Jul 22, 2019
@Maoni0
Copy link
Member

Maoni0 commented Jul 22, 2019

@janvorli would you please take a look at cgroup2 and see if it's a simple matter of adopting it (eg, read the same values just from different places kind of thing) or does it mean we'll need to handle new scenarios enabled by cgroup2 and/or does it make us change anything we are currently doing?

@omajid
Copy link
Member Author

omajid commented Jul 23, 2019

@carlossanlop Thanks for raising the visibility of this issue. I was hoping to use this bug as a tracker and track fixes across multiple components, not just corefx. Is there a better place to file such bugs that have a larger scope?

@omajid
Copy link
Member Author

omajid commented Jul 23, 2019

Oh, and in case it was not obvious, I am planning (hoping?) on contributing all the required fixes to corefx and coreclr (and anything else that pops up).

@carlossanlop
Copy link
Member

carlossanlop commented Jul 23, 2019

Bugs, feature requests, proposals need to all be opened in dotnet/corefx. That is my understanding. Everything happens here. @danmosemsft would you mind confirming if this is the right answer?

The dotnet/core repo is used mainly as a central point for people using our tutorials to report issues, so it has very little visibility and activity.

@danmoseley
Copy link
Member

Bugs, feature requests, proposals need to all be opened in dotnet/corefx. That is my understanding. Everything happens here. @danmosemsft would you mind confirming if this is the right answer?

Yup, we track work in corefx with issues in corefx repo.

@danmoseley
Copy link
Member

cc @richlander

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 5.0 milestone Feb 1, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@omajid
Copy link
Member Author

omajid commented Apr 24, 2020

I am going to close this issue now that all my initial patches have been merged into master branches.

Any further changes (features or bugfixes) should probably be handled separately.

@omajid omajid closed this as completed Apr 24, 2020
@omajid
Copy link
Member Author

omajid commented Apr 29, 2020

Could someone please update the tags on this? I think this could be classified as enhancement and os-linux?

@jkotas jkotas added os-linux Linux OS (any supported distro) area-PAL-coreclr tenet-performance Performance related issue enhancement Product code improvement that does NOT require public API changes/additions and removed area-Meta labels Apr 29, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-PAL-coreclr enhancement Product code improvement that does NOT require public API changes/additions os-linux Linux OS (any supported distro) tenet-performance Performance related issue untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

7 participants