~scoopta/wofi#144: 
support integrating with cgroup hierarchy

There's currently work going on by KDE and GNOME to launch all applications into cgroups. This has some advantages, like allowing better CPU scheduling, OOM behaviour and letting tools like task managers identify which application instance a process belongs to.

In my current dmenu setup, I use systemd-run to launch applications into the correct cgroup:

exec systemd-run --user --scope --slice=app.slice --unit="app-${1}-${2//-/_}-$RANDOM" "$2"

Unfortunately, I can not use this solution with wofi as it does not currently support customizing application launch. However since most users that run systemd distributions would want to take advantage of this functionality (if they know it exists), I think it would make a lot of sense sense to support it natively instead.

Here is a demo from some of the folks involved at the Linux App Summit: https://www.youtube.com/watch?v=JGOTe0cisxA

There is currently a draft specification: https://systemd.io/DESKTOP_ENVIRONMENTS/

This is the GNOME implementation of the feature: https://gitlab.gnome.org/GNOME/gnome-desktop/-/blob/master/libgnome-desktop/gnome-systemd.c#L194

Status
REPORTED
Submitter
notafile
Assigned to
No-one
Submitted
4 years ago
Updated
4 months ago
Labels
No labels applied.

~scoopta 4 years ago

Hmmm, I'll take a look at what would be involved. Maybe it's worth pursuing, not sure yet

~qwertychouskie 4 months ago

With the rise of system monitor utilities like Mission Center and Resources that separate applications and system processes, cgroup support would be very nice to have, as separating applications vs system processes is a lot more iffy when applications aren't launched in their own cgroups. See https://gitlab.com/mission-center-devs/mission-center/-/issues/231 for details.

Register here or Log in to comment, or comment via email.