Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914972 - sys-apps/openrc use 'unified' cgroups by default
Summary: sys-apps/openrc use 'unified' cgroups by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: OpenRC Team
URL: https://github.com/OpenRC/openrc/blob...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-30 13:29 UTC by Forza
Modified: 2024-01-29 11:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forza 2023-09-30 13:29:39 UTC
OpenRC has a long standing support for cgroups v1 and cgroups v2. When v2 (unified) was new, it made sense to support the current hybrid approach. The problem with hybrid mode is that controllers can only be assigned to either v1 or v2, but not both at the same time.

These days I believe all common apps supports cgroups v2. Docker was one of the blockers in the past, but now fully supports v2 as well: https://docs.docker.com/config/containers/runmetrics/

I propose that Gentoo changes its default to cgroups v2 by changing "/etc/rc.conf" to rc_cgroup_mode="unified". 

This will benefit users as services automatically will be assigned to individual cgroups, making resource management in Gentoo better overall. 


Reproducible: Always
Comment 1 Forza 2023-09-30 13:44:15 UTC
Additional comment. If we use unified cgroups by default in Gentoo, we could also implement cgroups for portage as suggested in https://bugs.gentoo.org/394419

I believe that systemd already uses unified cgroups by default.
Comment 2 William Hubbs gentoo-dev 2023-10-10 19:42:20 UTC
This is fixed in 0.51.

Thanks,

William