I tried to run a process dd if=/dev/zero of=/dev/null bs=20M
Then I got the PID using top
. Afterwards, I created a foo
directory under /sys/fs/cgroup/cpu/
and edited the following
1) Added 128 to cpu.shares
2) Added procID to tasks
However, the proc is still using 99% of CPU. Is my cgroup setting incorrect?
This may be a misunderstanding from my side, but it looks like my proc is getting 99% of the share only because the other procs aren't using the CPU at all. However, I was hoping that cgroup is supposed to implement "How much can you use" resources.
0 Answers