buy
How to enable cGroups v2

Overview

This guide will show you if cGroups v2 is supported by the operating system and how to enable it.

Procedure

First check if cGroups v2 is supported by the Operating System.

grep cgroup /proc/filesystems
image

Above command shows that cgroups v1 and v2 both are supported by the OS.

If nodev   cgroup2 is missing, it means your OS does not support v2.

check if cgroups v1 or v2 is enabled.

stat -fc %T /sys/fs/cgroup

If cGroups v1 is enabled and cGroups v2 is disabled then it will show below output:

image

If cGroups v2 is enabled then it will show below output:

image

If cGroups is disabled then to enabled follow the following steps:

  • Modify file "/etc/default/grub" 
  • Append the "systemd.unified_cgroup_hierarchy=1" in "GRUB_CMDLINE_LINUX=" line
  • After changes execute command as a root, execute "update-grub" if ubuntu or else "grub2-mkconfig"
  • Execute "apt/yum upgrade" command as per your operating system.
  • Execute "reboot" and check again if v2 is enabled.
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list