[libvirt] How about realize domainSetBlockIoTune by cgroup?

Hello experts, It seems that blkiotune of kvm domain is set through qemu now, and We found there are some throttle shaking problem when using this interface. As you can do the same thing through blkio cgroup, and this sounds to show better performance, Can we realize domainSetBlockIoTune by cgroup just like interface domainSetBlkioParameters ? Or Add a new interface to support setting disk IOtune by blkio cgroup? Thanks ------------------ Best regards! GuanQiang 2013-08-27

On 08/26/2013 10:10 PM, hzguanqiang@corp.netease.com wrote:
Hello experts,
[please configure your mailer to wrap long lines]
It seems that blkiotune of kvm domain is set through qemu now, and We found there are some throttle shaking problem when using this interface.
As you can do the same thing through blkio cgroup, and this sounds to show better performance, Can we realize domainSetBlockIoTune by cgroup just like interface domainSetBlkioParameters ? Or Add a new interface to support setting disk IOtune by blkio cgroup?
Current libvirt already lets you choose between cgroup blkio vs. qemu io throttling. Compare: http://libvirt.org/formatdomain.html#elementsBlockTuning describes <blkiotune> (implemented via cgroups, on a per-host-block-device basis); mapped through the virDomainSetBlkioParameters API, or via 'virsh blkiotune' http://libvirt.org/formatdomain.html#elementsDisks describes <iotune> under <disk> (implemented via qemu, on a per-guest-disk basis); mapped through the virDomainSetBlockIoTune API, or via 'virsh blkdeviotune' (and yes, we're lousy at using consistently named API) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 2013-08-28 09:35 , Eric Blake wrote: On 08/26/2013 10:10 PM, hzguanqiang@corp.netease.com wrote:
Hello experts,
[please configure your mailer to wrap long lines]
It seems that blkiotune of kvm domain is set through qemu now, and We found there are some throttle shaking problem when using this interface.
As you can do the same thing through blkio cgroup, and this sounds to show better performance, Can we realize domainSetBlockIoTune by cgroup just like interface domainSetBlkioParameters ? Or Add a new interface to support setting disk IOtune by blkio cgroup?
Current libvirt already lets you choose between cgroup blkio vs. qemu io throttling. Compare: http://libvirt.org/formatdomain.html#elementsBlockTuning describes <blkiotune> (implemented via cgroups, on a per-host-block-device basis); mapped through the virDomainSetBlkioParameters API, or via 'virsh blkiotune' http://libvirt.org/formatdomain.html#elementsDisks describes <iotune> under <disk> (implemented via qemu, on a per-guest-disk basis); mapped through the virDomainSetBlockIoTune API, or via 'virsh blkdeviotune' (and yes, we're lousy at using consistently named API) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org Well , Eric, Thanks for your answer. The virDomainSetBlkioParameters API you said is just to set the blkio.device_weight, not throttle.iops or throttle.bps just as the virDomainSetBlockIoTune API did. Thanks ------------------ Best regards! GuanQiang 09:40:56

Hmm, It seems everybody is in busy. I want to join the community and make contribution. As I'm a newer, I really appreciate experts' advice. I know in openstack community, there is a blueprint where you can put forward your idea and pepole can review. I don't know whether libvirt community has the same thing. All I found about contributor guidelines are from documentation on http://libvirt.org/hacking.html . So If anybody can give some advice, I really appreciate. Thanks On 2013-08-27 12:10 , hzguanqiang@corp.netease.com wrote: Hello experts, It seems that blkiotune of kvm domain is set through qemu now, and We found there are some throttle shaking problem when using this interface. As you can do the same thing through blkio cgroup, and this sounds to show better performance, Can we realize domainSetBlockIoTune by cgroup just like interface domainSetBlkioParameters ? Or Add a new interface to support setting disk IOtune by blkio cgroup? Thanks ------------------ Best regards! GuanQiang 2013-08-27 ------------------ Best regards! GuanQiang 09:19:09

On 08/27/2013 12:10 PM, hzguanqiang@corp.netease.com wrote:
Hello experts,
It seems that blkiotune of kvm domain is set through qemu now, and We found there are some throttle shaking problem when using this interface.
As you can do the same thing through blkio cgroup, and this sounds to show better performance, Can we realize domainSetBlockIoTune by cgroup just like interface domainSetBlkioParameters ? Or Add a new interface to support setting disk IOtune by blkio cgroup?
You mean blkio.throttle.[write|read]_bps_device? libvirt doesn't support this interface of block cgroup now. Maybe we can implement this feature.

On 2013-08-28 09:43 , Gao feng wrote: On 08/27/2013 12:10 PM, hzguanqiang@corp.netease.com wrote:
Hello experts,
It seems that blkiotune of kvm domain is set through qemu now, and We found there are some throttle shaking problem when using this interface.
As you can do the same thing through blkio cgroup, and this sounds to show better performance, Can we realize domainSetBlockIoTune by cgroup just like interface domainSetBlkioParameters ? Or Add a new interface to support setting disk IOtune by blkio cgroup?
You mean blkio.throttle.[write|read]_bps_device? libvirt doesn't support this interface of block cgroup now. Maybe we can implement this feature. Yes, That's exactly what I mean. If this feature is needed, I may try to implement this. ------------------ Best regards! GuanQiang 09:45:15

On 08/28/2013 09:47 AM, hzguanqiang@corp.netease.com wrote:
On 2013-08-28 09:43 , Gao feng <mailto:gaofeng@cn.fujitsu.com> wrote:
On 08/27/2013 12:10 PM, hzguanqiang@corp.netease.com wrote: > Hello experts, > > It seems that blkiotune of kvm domain is set through qemu now, and We found there are some throttle shaking problem when using this interface. > > As you can do the same thing through blkio cgroup, and this sounds to show better performance, Can we realize domainSetBlockIoTune by cgroup just like interface domainSetBlkioParameters ? Or Add a new > interface to support setting disk IOtune by blkio cgroup? >
You mean blkio.throttle.[write|read]_bps_device? libvirt doesn't support this interface of block cgroup now.
Maybe we can implement this feature.
Yes, That's exactly what I mean. If this feature is needed, I may try to implement this.
Ok, patches are welcomed :)
participants (3)
-
Eric Blake
-
Gao feng
-
hzguanqiang@corp.netease.com