Enabling cgroups v2
At boot time, Oracle Linux 8 mounts cgroups v1
by default. To
use cgroups v2
, you must manually configure the system.
- Verify that
cgroups v2
is enabled and mounted on the system.sudo mount -l | grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_recursiveprot)
If the output of the command doesn't specify
cgroup2
, then do the following to enable version 2.-
Configure the system boot to mount
cgroups v2
by default.sudo grubby --update-kernel=/boot/vmlinuz-$(uname -r) --args="systemd.unified_cgroup_hierarchy=1"
The command adds
systemd.unified_cgroup_hierarchy=1
to the current boot entry. To add this parameter to all kernel boot entries, type:sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=1"
-
Reboot the system.
-
After the system reboots, verify that
cgroups v2
is now mounted.sudo mount -l | grep cgroup
-