qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] Why qemu processes can bypass cgroup's blkio.weight ?


From: Bob Chen
Subject: Re: [Qemu-block] Why qemu processes can bypass cgroup's blkio.weight ?
Date: Mon, 15 Feb 2016 16:57:02 +0800

1. The host IO scheduler is CFQ indeed

2. I have run fio on host as you suggested:
fio --filename=/dev/sdc1 --direct=1 --rw=read --ioengine=libaio --size=100% --bs=1024k --name=read
The two processes achieved exactly the proportional throughput after I modified their cgroup blkio.weight.

3. As to qemu, I'm still pretty sure that blkio.weight is not working. It is very easy to testify and reproduce.

2016-02-09 0:21 GMT+08:00 Stefan Hajnoczi <address@hidden>:
On Fri, Jan 22, 2016 at 10:57:29AM +0800, Bob Chen wrote:
> I want to achieve proportional IO sharing by using cgroup.
>
> My qemu config is:     -drive
> file=$DISKFILe,if=none,format=qcow2,cache=none,aio=native -device
> virtio-blk-pci...
>
> Test command inside vm is:     dd if=/dev/vdc of=/dev/null iflag=direct
>
> Cgroup blkio weight of the qemu process is properly configured as well.
>
> But no matter how change the proportion, such as vm1=400 and vm2=100, I can
> only get the *equal IO speed*.
>
> Wondering cgroup blkio.weight or blkio.weight_device has no effect on qemu?
>
>
> PS. cache=writethrough aio=threads is also tested, the same results.

Are you sure your host is using the CFQ I/O scheduler?  Proportional
blkio weights are only supported in CFQ.

Have you confirmed that your blkio usage is correct by replacing QEMU
with fio?

Use fio's direct=1 ioengine=libaio to get something similar to QEMU's
cache=none,aio=native.  Then you can run two fio processes with the same
blkio configuration you are trying to use with QEMU.

If you have configured blkio correctly then the two fio processes will
achieve the proportions you have set.

Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]