|
|
Subscribe / Log in / New account

Resource management in KDE

Resource management in KDE

Posted Oct 20, 2020 11:03 UTC (Tue) by ovitters (guest, #27950)
Parent article: Resource management in KDE

How well does this work under cgroups v1 and v2? Does some of this work in v1? Is it advisable to have distributions switch to v2? The article goes into v1 and v2 and the article might explain what is possible under v1 vs v2 but not clearly enough for me.

For Mageia I only noticed comments that v2 does not work nicely with some software, plus v2 doesn't seem to provide benefits. In case KDE and GNOME have features that rely on v2 then someone might spend the effort of switching to v2. Though I'd expect KDE and GNOME to let distributions know (e.g. distributor-list for GNOME).


to post comments

Resource management in KDE

Posted Oct 20, 2020 16:30 UTC (Tue) by Conan_Kudo (subscriber, #103240) [Link] (4 responses)

The current assumption with the cgroup code in GNOME and KDE Plasma is that cgroup v2 is in use. That is, the unified hierarchy is enabled (as systemd calls it). Today, that is active in Fedora (since Fedora 31), and I expect it will be enabled in openSUSE Tumbleweed soon.

Resource management in KDE

Posted Oct 20, 2020 21:43 UTC (Tue) by ms (subscriber, #41272) [Link] (3 responses)

Last I checked (~2 months ago), Docker still requires v1. So for a huge number of us doing development work who sadly depend on Docker, the hybrid "unified" hierarchy is the furthest you can get to turning v1 off.

Resource management in KDE

Posted Oct 20, 2020 21:45 UTC (Tue) by Conan_Kudo (subscriber, #103240) [Link] (1 responses)

Moby supports cgroup v2 in the mainline code, it just hasn't been released yet. Once the first Moby/Docker 20.xx release arrives, that should be resolved. Alternatively, you can ship a snapshot release...

Resource management in KDE

Posted Oct 21, 2020 8:17 UTC (Wed) by ms (subscriber, #41272) [Link]

Very useful to know - thank you.

Resource management in KDE

Posted Oct 20, 2020 23:05 UTC (Tue) by intelfx (subscriber, #130118) [Link]

There is Podman which is mostly compatible to Docker and supports unified hierarchy (via crun runtime) for some time now. This is how I solved this problem for myself.

Resource management in KDE

Posted Oct 21, 2020 13:20 UTC (Wed) by hchain (guest, #142655) [Link]

cgroups v2 is the intended successor, hybrid hierarchy is only a transition.
New cgroup-related features are only happening on v2, both in the kernel and in systemd.
The "processes only in leaf nodes" rule, while a constraint, actually makes things easier to manage and reason with.

This page https://systemd.io/CGROUP_DELEGATION/ has a lot of details on cgroups v1 vs v2 from a systemd point of view.
Highlight: "To say this clearly, legacy and hybrid modes have no future. If you develop software today and don’t focus on the unified mode, then you are writing software for yesterday, not tomorrow."

Another limitation is that managing user resources through systemd will never be possible with cgroups v1 / hybrid hierarchy, as this would require delegation to the user systemd instance, and "Delegation to less privileges processes is not safe in cgroup v1 (as a limitation of the kernel), hence systemd won’t facilitate access to it."

Also, docker (git master) finally supports cgroups v2, which should be in the next release (https://github.com/moby/moby/milestone/76). AFAIK, most other container runtimes have had support for a while.

Resource management in KDE

Posted Oct 21, 2020 16:05 UTC (Wed) by d_ed (guest, #142332) [Link]

Good question.

Super summary is:
- We work with both, systemd abstracts the settings
- Our system monitor works with both
- Better "fairness" should work with both
- Applying additional resource constraints (CPU/Memory/etc) is V2 only and within that some features relies on additional setups or versions.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds