6

Instructions for enabling the memory cgroup on Ubuntu 18 and 19 involve adding cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 to /boot/firmware/nobtcmd.txt and restarting. After rebooting, grep mem /proc/cgroups should show it as enabled.

I find that on Ubuntu 20.04 the above instructions are not working for me, and Kubernetes continues to error [ERROR SystemVerification]: missing cgroups: memory. Any suggestions?

2 Answers 2

8

I was able to get this working by appending cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 to the file /boot/firmware/cmdline.txt. Changes made to /boot/firmware/nobtcmd.txt in Ubuntu 20.04 appear to be ignored (there's a note in config.txt about cmdline=nobtcmd.txt being deprecated in favour of include commands).

1
  • 1
    Thanks can confirm, this actually works on 20.04
    – Alex W
    Jul 23, 2021 at 3:43
4

On 22.04 (kernel 5.15.0) booting via Grub:

  • add cgroup_enable=memory cgroup_memory=1 to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub;
  • followed by sudo update-grub and kernel reboot.

Verify with cat /proc/cmdline.

2
  • 1
    GRUB_CMDLINE_LINUX="cgroup_enable=memory cgroup_memory=1 systemd.unified_cgroup_hierarchy=0" issue Dec 25, 2022 at 9:23
  • 2
    After upgrade to 22.04, Docker failed to start complaining about "Your kernel does not support cgroup memory limit". This fixed it.
    – andrei
    Mar 1 at 15:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .