cgroup limits only affect kvm guest under certain conditions

2011-01-06 Thread Dominik Klein
Hi I am playing with cgroups and try to limit block io for guests. The proof of concept is: # mkdir /dev/cgroup/blkio # mount -t cgroup -o blkio blkio /dev/cgroup/blkio/ # cd blkio/ # mkdir test # cd test/ # ls -l /dev/vdisks/kirk lrwxrwxrwx 1 root root 7 2011-01-06 13:46 /dev/vdisks/kirk -

Re: [libvirt] cgroup limits only affect kvm guest under certain conditions

2011-01-06 Thread Daniel P. Berrange
On Thu, Jan 06, 2011 at 02:15:37PM +0100, Dominik Klein wrote: Hi I am playing with cgroups and try to limit block io for guests. The proof of concept is: # mkdir /dev/cgroup/blkio # mount -t cgroup -o blkio blkio /dev/cgroup/blkio/ # cd blkio/ # mkdir test # cd test/ # ls -l

Re: [libvirt] cgroup limits only affect kvm guest under certain conditions

2011-01-06 Thread Dominik Klein
Did you just echo the main qemu-kvm PID, or did you also add the PIDs of every thread too ? From this description of the problem, I'd guess you've only confined the main process thread and thus the I/O VCPU threads are not confined. That was indeed correct. I was mislead by the fact that no

Re: cgroup limits only affect kvm guest under certain conditions

2011-01-06 Thread KAMEZAWA Hiroyuki
On Thu, 06 Jan 2011 14:15:37 +0100 Dominik Klein d...@in-telegence.net wrote: Hi I am playing with cgroups and try to limit block io for guests. The proof of concept is: # mkdir /dev/cgroup/blkio # mount -t cgroup -o blkio blkio /dev/cgroup/blkio/ # cd blkio/ # mkdir test # cd test/

Re: cgroup limits only affect kvm guest under certain conditions

2011-01-06 Thread Dominik Klein
qemu consists of several threads. Cgroup works per thread now. Could you double check all threads for qemu are in a cgroup ? I think you have to write all thread-ID to tasks file when you move qemu after starting it. As stated yesterday: Yes, that was the problem. Works as expected now,