[Top][All Lists]

[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: Stefan Hajnoczi
Subject: Re: [Qemu-block] Why qemu processes can bypass cgroup's blkio.weight ?
Date: Mon, 15 Feb 2016 16:04:02 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

On Mon, Feb 15, 2016 at 04:57:02PM +0800, Bob Chen wrote:
> > 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

Host blkio controller does not "see" I/O requests that are satisfied
internally by QEMU without submitting host I/O requests.

Is it possible that your dd benchmark is reading lots of unallocated
zero regions from the qcow2 file?

In that case no host disk I/O is taking place so the blkio controller
doesn't come into play even though the guest thinks a lot of I/O is
taking place.  You may notice that the reads are very fast.  That is
because QEMU just checks the qcow2 L1/L2 table and decides the blocks
are filled with zeroes so no I/O is necessary.

When comparing blkio controller, don't trust the guest benchmark stats.
Use iostat(1) on the host to measure throughput and iops.


Attachment: signature.asc
Description: PGP signature

reply via email to

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