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-bin
reboot
Make a
cgroup
for your user (the owner of the process):sudo cgcreate -a ipeacocks -g cpu:ipeacocks
Ran the command:
echo 100 > /sys/fs/cgroup/cpu/ipeacocks/cpu.shares
And the command:
cgexec -g cpu:ipeacocks stress --cpu 4
and output:
cgroup change of group failed
Why? What I am doing wrong?