You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With PR #4255, cgroups support via the libsdprocess library (launching processes via systemd) is supported. However, specific configuration with RHEL8 would be required.
The AllowedCPUs (i.e. cpusets) support is only supported with cgroupsv2 (i.e. unified cgroups) per the systemd.resource-control manpage. So unified cgroups needs to be enabled.
By default, it appears RHEL8 sets up cgroups delegation only for Memory and Tasks. We need to add for CPUs too. I believe that can be done by setting up:
There appears to be a bug in RHEL8's systemd (systemd-239-51.el8_5.3.x86_64 as of this writing) where cgroups are not always delegated to user services correctly. I believe all of the following issues point to the same issue
which I believe will populate all user services with the same delegations. We could instead set things up per user, which is what I think we should do:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
With PR #4255, cgroups support via the
libsdprocess
library (launching processes via systemd) is supported. However, specific configuration with RHEL8 would be required.The AllowedCPUs (i.e. cpusets) support is only supported with cgroupsv2 (i.e. unified cgroups) per the
systemd.resource-control
manpage. So unified cgroups needs to be enabled.By default, it appears RHEL8 sets up cgroups delegation only for Memory and Tasks. We need to add for CPUs too. I believe that can be done by setting up:
systemd-239-51.el8_5.3.x86_64
as of this writing) where cgroups are not always delegated to user services correctly. I believe all of the following issues point to the same issuesystemd/systemd#9763
systemd/systemd#9578
systemd/systemd#9512
systemd/systemd#9502
and the fix is (I think):
systemd/systemd#9502
which is in systemd v240 (I think).
Other than cgroups not working, the way I noticed this not working was by doing (note that 8556 is my UID, replace with relevant UID of user service):
Normally, Memory should be set. e.g.
Another way to see this is to check if cgroup controllers for the service are set or not. e.g.
if things are not working, the file will be empty. If things are working, this should be populated.
To workaround this I tried out the instructions here:
https://unix.stackexchange.com/questions/624428/cgroups-v2-cgroup-controllers-not-delegated-to-non-privileged-users-on-centos-s
which I believe will populate all user services with the same delegations. We could instead set things up per user, which is what I think we should do:
TL;DR
recommend setting:
unified cgroups in kernel boot cmdline
Beta Was this translation helpful? Give feedback.
All reactions