[libvirt] [RFC PATCH 0/8 v2] Summary on block IO throttle

Lei Li lilei at linux.vnet.ibm.com
Fri Oct 28 08:59:40 UTC 2011


On 10/27/2011 11:45 PM, Eric Blake wrote:
> On 10/27/2011 03:12 AM, Lei Li wrote:
>> 1) Enable the blkio throttling in xml when guest is starting up.
>>
>> Add blkio throttling in xml as follows:
>>
>> <disk type='file' device='disk'>
>> <driver name='qemu' type='raw'/>
>> <source file='/var/lib/libvirt/images/kvm-one.img'/>
>> <target dev='vda' bus='virtio'/>
>> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' 
>> function='0x0'/>
>> <iotune bps='n'.../>
>> </disk>
>>
>> 2) Enable blkio throttling setting at guest running time.
>>
>> virsh blkiothrottle<domain> <device>  [--bps<number>] 
>> [--bps_rd<number>] \
>> [--bps_wr<number>] [--iops<number>] [--iops_rd<number>] 
>> [--iops_wr<number>]
>>
>> 3) The support to get the current block i/o throttling for a device - 
>> HMP/QMP.
>>
>> virsh blkiothrottle<domain> <device>
>
> Given that the XML is named <iotune> under <disk>, we should probably 
> name the virsh command 'blkiotune' or 'disk-iotune', not 'blkiothrottle'.
>
Hi Eric, we used<iothrottle>  first, I changed it since Daniel P. Berrange
proposed<iotune>  for per-disk element instead of<iothrottle>  when we
discussed at RFC V1.

The command 'blkiotune' already exist, supported the cgroups
blkio-controller, which handles proportional shares and throughput/iops
limits on host block devices, global to the domain, but blkio throttling
is specified per-disk and can vary across multiple disks. They are different
two mechanism.

So how about use<iothrottle>  again? :)

> Also, <iotune bps='n'.../> doesn't look right.  This should be similar 
> to the top-level XML.  Here, taking into account the other proposal 
> for per-block-device values (which can't be tied to individual <disk>):
>
> <domain...>
> <blkiotune>
> <weight>800</weight>
> <device>
> <path>/path/to/device</path>
> <weight>200</weight>
> </device>
> </blkiotune>
> <devices>
> <disk ...>
> <iotune>
> <bps>800</bps>
>         ...
> </iotune>
> </disk>
> </devices>
> </domain>
>
OK. I will do it at v3.

>
>>
>>   daemon/remote.c                 |   85 +++++++++++++++++
>>   include/libvirt/libvirt.h.in    |   25 +++++
>
> Missing changes in docs/formatdomain.html.in (to describe the new 
> XML), docs/schemas/domaincommon.rng (to validate the new xml), and 
> tests/ (probably qemuxml2argvdata), to test it.
>


-- 
Lei




More information about the libvir-list mailing list