I'm trying to learn how cgroup works on Ubuntu and seems that cgroup doesn't work in Ubuntu 13.04. I am using the answer to this question How to set cpu limit for given process permanently. Cpulimit and nice don't work
These are what I've done:
Installed
cgroup:sudo apt-get install cgroup-binreboot
Make a
cgroupfor your user (the owner of the process):sudo cgcreate -a ipeacocks -g cpu:ipeacocksRan the command:
echo 100 > /sys/fs/cgroup/cpu/ipeacocks/cpu.sharesAnd the command:
cgexec -g cpu:ipeacocks stress --cpu 4
and output:
cgroup change of group failed
Why? What I am doing wrong?
sudo cgcreate -a $USER:$USER -t $USER:$USER -g ...– Aquarius Power Jul 08 '17 at 23:45chmod 711 /sys/fs/cgroup/cpu,cpuacct– Roland Pihlakas Sep 30 '20 at 20:18