[dm-devel] Re: [kvm-devel] I/O bandwidth control on KVM

Anthony Liguori anthony at codemonkey.ws
Wed Mar 5 16:30:09 UTC 2008


Ryo Tsuruta wrote:
> Hi,
>
>   
>> If you are using virtio drivers in the guest (which I presume you are 
>> given the reference to /dev/vda), try using the following -drive syntax:
>>
>> -drive file=/dev/mapper/ioband1,if=virtio,boot=on,cache=off
>>
>> This will force the use of O_DIRECT.  By default, QEMU does not open 
>> with O_DIRECT so you'll see page cache effects.
>>     
>
> I tried the test with "cache=off" option, here is the result. 
>   

Can you give the attached patch a try?  The virtio backend does 
synchronous IO requests blocking the guest from making progress until 
the IO completes.  It's possible that what you're seeing is the 
scheduler competing with your IO bandwidth limiting in order to ensure 
fairness since IO completion is intimately tied to CPU consumption 
(since we're using blocking IO).

The attached patch implements AIO support for the virtio backend so if 
this is the case, you should see the proper proportions.

Regards,

Anthony Liguori
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtio:blk_aio.patch
Type: text/x-diff
Size: 4144 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20080305/23c3df02/attachment.bin>


More information about the dm-devel mailing list