[opensuse-factory] Switch systemd to the unified cgroup hierarchy by default
Hello. Quick background -- there are two cgroup APIs, systemd can maintain cgroup hierarchy in three modes: legacy (v1), unified (v2) and hybrid (v1 for controllers + v2 for (mainly) process tracking). Hybrid is the current default. All [1] controllers have their v2 counterpart since kernel v5.2 and support for them is present in systemd since v240. The v2 API rectifies problems of v1 (see [2] for details), allows new features of controllers and sees the most development. However, the systemd hybrid hierarchy mandates use of v1 controllers. Therefore I suggest that the upstream closely following distribution as Tumbleweed switched systemd to the unified mode by default. The used hierarchy is transparent to the users of systemd resource directives (of course as long as they rely on v1 behavior only). OTOH, there are some direct users (containers and libvirt come to my mind first) that may need some adjustments/updates to operate as with the hybrid hierarchy (or they can manually switch back to the hybrid hierarchy [3]). I'm asking in this list, whether there are any use cases that are worth considering before this potentially breaking change. Thanks, Michal P.S. I'm not subscribed to opensuse-factory ML, please keep me CC'ed. [1] Besides hugetlb controller. But this change is hopefully irrelevant for controllers not used by systemd since their users can still stick with v1 on separate hierarchies. [2] https://www.kernel.org/doc/Documentation/admin-guide/cgroup-v2.rst [3] By specifying 'systemd.unified_cgroup_hierarchy=0' on the kernel cmdline. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 24. 10. 19, 17:07, Michal Koutný wrote:
Hello.
Quick background -- there are two cgroup APIs, systemd can maintain cgroup hierarchy in three modes: legacy (v1), unified (v2) and hybrid (v1 for controllers + v2 for (mainly) process tracking). Hybrid is the current default.
All [1] controllers have their v2 counterpart since kernel v5.2 and support for them is present in systemd since v240.
Hi, what happens if I boot older kernels if we switch to pure v2 in systemd? That is usual practice during bughunting. So is this build-time or boot-time switch? thanks, -- js suse labs -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hello.
On Tue, Oct 29, 2019 at 11:25:30AM +0100, Jiri Slaby
what happens if I boot older kernels if we switch to pure v2 in systemd? That is usual practice during bughunting. It depends on how old kernel you boot.
(The recent systemd should handle it gracefully, i.e. as you go more deeper in history, available controllers start disappearing, then (v4.5) cgroup2 isn't available anymore, systemd would fall back to v1 and that's again close to the current state from the general debugging perspective.)
So is this build-time or boot-time switch? The default behavior of systemd is a build-time switch.
It can be overriden with a boot-time option though (the option is interpretted by systemd which then interacts with the kernel accordingly). Michal
On 29. 10. 19, 18:08, Michal Koutný wrote:
Hello.
On Tue, Oct 29, 2019 at 11:25:30AM +0100, Jiri Slaby
wrote: what happens if I boot older kernels if we switch to pure v2 in systemd? That is usual practice during bughunting. It depends on how old kernel you boot.
(The recent systemd should handle it gracefully, i.e. as you go more deeper in history, available controllers start disappearing, then (v4.5) cgroup2 isn't available anymore, systemd would fall back to v1 and that's again close to the current state from the general debugging perspective.)
So is this build-time or boot-time switch? The default behavior of systemd is a build-time switch.
It can be overriden with a boot-time option though (the option is interpretted by systemd which then interacts with the kernel accordingly).
So fine by me. thanks, -- js suse labs
participants (2)
-
Jiri Slaby
-
Michal Koutný