wahaha 4 Posted December 2, 2021 hi, i am using cgroup v2 for containerization. however, cgroup v2 is not able to get cpu and cpuset. not sure if this is related to a kernel issue? cgroup v1 is able to detect it, but i have to use cgroup v2 instead. would be great if you could help Share this post Link to post Share on other sites
wahaha 4 Posted December 5, 2021 I changed the settings to carry on reading from cgroups v1 instead. I do this by setting this in /boot/cmdline.txt: systemd.unified_cgroup_hierarchy=0 Share this post Link to post Share on other sites
Joe 3 Posted December 9, 2021 Hi @wahaha Tinker2 only support cgroup v1. sudo mkdir -p /sys/fs/cgroup/cpu/testgroup linaro@linaro-alip:~$ cat /sys/fs/cgroup/cpu/cpu.shares 1024 linaro@linaro-alip:~$ sudo sh -c "echo 256 > /sys/fs/cgroup/cpu/testgroup/cpu.shares" linaro@linaro-alip:~$ cat /sys/fs/cgroup/cpu/testgroup/cpu.shares 256 linaro@linaro-alip:~$ stressapptest -s 6000 -M 1200 [Before execution] stressapptest CPU loading [58x%] [Open new Consloe] linaro@linaro-alip:~$ openssl sha1 < /dev/zero & linaro@linaro-alip:~$ openssl sha1 < /dev/zero & [Before execution] stressapptest CPU loading [50x%] [Before execution] openssl CPU loading [4x%] linaro@linaro-alip:~$ pgrep stress 954 linaro@linaro-alip:~$ sudo sh -c "echo 954 > /sys/fs/cgroup/cpu/testgroup/cgroup.procs" linaro@linaro-alip:~$ cat /sys/fs/cgroup/cpu/testgroup/cgroup.procs 954 [After execution] stressapptest CPU loading upto [40x%] [After execution] openssl CPU loading upto [9x%] Thanks Share this post Link to post Share on other sites
wahaha 4 Posted October 24, 2022 Hi @Joe, Is this still the case with the latest 4.19 kernel? Share this post Link to post Share on other sites