以下Linux发行版默认启用cgroup v2: * Fedora (since 31) * Arch Linux (since April 2021) * openSUSE Tumbleweed (since c. 2021) * Debian GNU/Linux (since 11) * Ubuntu (since 21.10) * RHEL and RHEL-like distributions (since 9) 配置: ``` # sudo cat /etc/default/grub GRUB_CMDLINE_LINUX="cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1 cgroup_cpu=1 cgroup_enable=cpu" # sudo update-grub ``` 重启, ``` # sudo reboot ``` 重启后, ``` # sudo stat -fc %T /sys/fs/cgroup/ cgroup2fs # cat /sys/fs/cgroup/cgroup.controllers # cpuset io memory hugetlb pids rdma ``` 缺少了cpu项,解决方法: https://rootlesscontaine.rs/getting-started/common/cgroup2/#enabling-cpu-cpuset-and-io-delegation