* [Qemu-devel] The design choice for how to enable block I/O throttling function in libvirt
@ 2011-08-30 2:55 Zhi Yong Wu
2011-08-30 7:18 ` [Qemu-devel] [libvirt] " shu ming
[not found] ` <CAJSP0QW1CPCokX=F5z7y==vn1S4wH0VtOaQ7oj4kC7f7uQM4MQ@mail.gmail.com>
0 siblings, 2 replies; 12+ messages in thread
From: Zhi Yong Wu @ 2011-08-30 2:55 UTC (permalink / raw)
To: libvir-list; +Cc: Stefan Hajnoczi, Zhi Yong Wu, QEMU Developers, Adam Litke
HI, folks,
I am trying to enable block I/O throttling function in libvirt. But
currently i met some design questions, and don't make sure if we
should extend blkiotune to support block I/O throttling or introduce
one new libvirt command "blkiothrottle" to cover it or not. If you
have some better idea, pls don't hesitate to drop your comments.
If one new libvirt command "blkiothrottle" is introduced, I plan to
design its usage syntax as below:
virsh # help blkiothrottle
NAME
blkiothrottle - Set or display a block disk I/O throttle setting.
SYNOPSIS
blkiothrottle <domain> <device> [--bps <number>] [--bps_rd
<number>] [--bps_wr <number>] [--iops <number>] [--iops_rd <number>]
[--iops_wr <number>]
DESCRIPTION
Set or display a block disk I/O throttle setting.
OPTIONS
[--domain] <string> domain name, id or uuid
[--device] <string> block device
--bps <number> total throughput limits in bytes/s
--bps_rd <number> read throughput limits in bytes/s
--bps_wr <number> write throughput limits in bytes/s
--iops <number> total operation limits in numbers/s
--iops_rd <number> read operation limits in numbers/s
--iops_wr <number> write operation limits in numbers/s
virsh #
2.) If blkiotune command is extended to enable block I/O throttling function.
virsh # help blkiotune
NAME
blkiotune - Get or set blkio parameters
SYNOPSIS
blkiotune <domain> [--weight <number>] [--config] [--live]
[--current] [--bps <number>] [--bps_rd <number>] [--bps_wr <number>]
[--iops <number>] [--iops_rd <number>] [--iops_wr <number>]
DESCRIPTION
Get or set the current blkio parameters for a guest domain.
To get the blkio parameters use following command:
virsh # blkiotune <domain>
OPTIONS
[--domain] <string> domain name, id or uuid
--weight <number> IO Weight in range [100, 1000]
--config affect next boot
--live affect running domain
--current affect current domain
Welcome to your suggestions or comments about how to choose it. thanks.
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [libvirt] The design choice for how to enable block I/O throttling function in libvirt
2011-08-30 2:55 [Qemu-devel] The design choice for how to enable block I/O throttling function in libvirt Zhi Yong Wu
@ 2011-08-30 7:18 ` shu ming
2011-08-30 8:10 ` Zhi Yong Wu
[not found] ` <CAJSP0QW1CPCokX=F5z7y==vn1S4wH0VtOaQ7oj4kC7f7uQM4MQ@mail.gmail.com>
1 sibling, 1 reply; 12+ messages in thread
From: shu ming @ 2011-08-30 7:18 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: libvir-list, QEMU Developers
See commens below.
Zhi Yong Wu:
> HI, folks,
>
> I am trying to enable block I/O throttling function in libvirt. But
> currently i met some design questions, and don't make sure if we
> should extend blkiotune to support block I/O throttling or introduce
> one new libvirt command "blkiothrottle" to cover it or not. If you
> have some better idea, pls don't hesitate to drop your comments.
>
> If one new libvirt command "blkiothrottle" is introduced, I plan to
> design its usage syntax as below:
>
> virsh # help blkiothrottle
> NAME
> blkiothrottle - Set or display a block disk I/O throttle setting.
>
> SYNOPSIS
> blkiothrottle<domain> <device> [--bps<number>] [--bps_rd
> <number>] [--bps_wr<number>] [--iops<number>] [--iops_rd<number>]
> [--iops_wr<number>]
>
> DESCRIPTION
> Set or display a block disk I/O throttle setting.
>
> OPTIONS
> [--domain]<string> domain name, id or uuid
> [--device]<string> block device
> --bps<number> total throughput limits in bytes/s
> --bps_rd<number> read throughput limits in bytes/s
> --bps_wr<number> write throughput limits in bytes/s
> --iops<number> total operation limits in numbers/s
> --iops_rd<number> read operation limits in numbers/s
> --iops_wr<number> write operation limits in numbers/s
>
How to display the current I/O throttle setting of a specific block
device here?
I prfer to have less command to be as simple as possible for users. But
it seems
that we need another command here instead of having a block IO specific
command like "iothrottle".
Supposely, the next step of I/O throttling will be network device
limit. Shoud we have another
new command like "niciothrottle"?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [libvirt] The design choice for how to enable block I/O throttling function in libvirt
2011-08-30 7:18 ` [Qemu-devel] [libvirt] " shu ming
@ 2011-08-30 8:10 ` Zhi Yong Wu
2011-08-30 8:31 ` shu ming
0 siblings, 1 reply; 12+ messages in thread
From: Zhi Yong Wu @ 2011-08-30 8:10 UTC (permalink / raw)
To: shu ming; +Cc: libvir-list, guijianfeng, QEMU Developers, hutao
On Tue, Aug 30, 2011 at 3:18 PM, shu ming <shuming@linux.vnet.ibm.com> wrote:
> See commens below.
> Zhi Yong Wu:
>>
>> HI, folks,
>>
>> I am trying to enable block I/O throttling function in libvirt. But
>> currently i met some design questions, and don't make sure if we
>> should extend blkiotune to support block I/O throttling or introduce
>> one new libvirt command "blkiothrottle" to cover it or not. If you
>> have some better idea, pls don't hesitate to drop your comments.
>>
>> If one new libvirt command "blkiothrottle" is introduced, I plan to
>> design its usage syntax as below:
>>
>> virsh # help blkiothrottle
>> NAME
>> blkiothrottle - Set or display a block disk I/O throttle setting.
>>
>> SYNOPSIS
>> blkiothrottle<domain> <device> [--bps<number>] [--bps_rd
>> <number>] [--bps_wr<number>] [--iops<number>] [--iops_rd<number>]
>> [--iops_wr<number>]
>>
>> DESCRIPTION
>> Set or display a block disk I/O throttle setting.
>>
>> OPTIONS
>> [--domain]<string> domain name, id or uuid
>> [--device]<string> block device
>> --bps<number> total throughput limits in bytes/s
>> --bps_rd<number> read throughput limits in bytes/s
>> --bps_wr<number> write throughput limits in bytes/s
>> --iops<number> total operation limits in numbers/s
>> --iops_rd<number> read operation limits in numbers/s
>> --iops_wr<number> write operation limits in numbers/s
>>
>
> How to display the current I/O throttle setting of a specific block device
> here?
It will show as below:
virtio0: bps=xxx, bps_rd=xxx, bps_wr=xxx, iops=xxx, iops_rd=xxx, iops_wr=xxx.
> I prfer to have less command to be as simple as possible for users. But it
> seems
> that we need another command here instead of having a block IO specific
> command like "iothrottle".
I also prefer this, but would like to get other guy's suggestions,
especially maintainers.
> Supposely, the next step of I/O throttling will be network device limit.
> Shoud we have another
> new command like "niciothrottle"?
For network device, network cgroup can cover this.
>
>
>
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [libvirt] The design choice for how to enable block I/O throttling function in libvirt
2011-08-30 8:10 ` Zhi Yong Wu
@ 2011-08-30 8:31 ` shu ming
2011-08-30 8:36 ` Zhi Yong Wu
0 siblings, 1 reply; 12+ messages in thread
From: shu ming @ 2011-08-30 8:31 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: libvir-list, guijianfeng, QEMU Developers, hutao
Zhi Yong Wu:
> On Tue, Aug 30, 2011 at 3:18 PM, shu ming<shuming@linux.vnet.ibm.com> wrote:
>> See commens below.
>> Zhi Yong Wu:
>>> HI, folks,
>>>
>>> I am trying to enable block I/O throttling function in libvirt. But
>>> currently i met some design questions, and don't make sure if we
>>> should extend blkiotune to support block I/O throttling or introduce
>>> one new libvirt command "blkiothrottle" to cover it or not. If you
>>> have some better idea, pls don't hesitate to drop your comments.
>>>
>>> If one new libvirt command "blkiothrottle" is introduced, I plan to
>>> design its usage syntax as below:
>>>
>>> virsh # help blkiothrottle
>>> NAME
>>> blkiothrottle - Set or display a block disk I/O throttle setting.
>>>
>>> SYNOPSIS
>>> blkiothrottle<domain> <device> [--bps<number>] [--bps_rd
>>> <number>] [--bps_wr<number>] [--iops<number>] [--iops_rd<number>]
>>> [--iops_wr<number>]
>>>
>>> DESCRIPTION
>>> Set or display a block disk I/O throttle setting.
>>>
>>> OPTIONS
>>> [--domain]<string> domain name, id or uuid
>>> [--device]<string> block device
>>> --bps<number> total throughput limits in bytes/s
>>> --bps_rd<number> read throughput limits in bytes/s
>>> --bps_wr<number> write throughput limits in bytes/s
>>> --iops<number> total operation limits in numbers/s
>>> --iops_rd<number> read operation limits in numbers/s
>>> --iops_wr<number> write operation limits in numbers/s
>>>
>> How to display the current I/O throttle setting of a specific block device
>> here?
> It will show as below:
> virtio0: bps=xxx, bps_rd=xxx, bps_wr=xxx, iops=xxx, iops_rd=xxx, iops_wr=xxx.
With which options to the command? I guess "blkiothrottle <domain>
<device>" will display the current setting.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [libvirt] The design choice for how to enable block I/O throttling function in libvirt
2011-08-30 8:31 ` shu ming
@ 2011-08-30 8:36 ` Zhi Yong Wu
0 siblings, 0 replies; 12+ messages in thread
From: Zhi Yong Wu @ 2011-08-30 8:36 UTC (permalink / raw)
To: shu ming; +Cc: libvir-list, guijianfeng, QEMU Developers, hutao
On Tue, Aug 30, 2011 at 4:31 PM, shu ming <shuming@linux.vnet.ibm.com> wrote:
> Zhi Yong Wu:
>>
>> On Tue, Aug 30, 2011 at 3:18 PM, shu ming<shuming@linux.vnet.ibm.com>
>> wrote:
>>>
>>> See commens below.
>>> Zhi Yong Wu:
>>>>
>>>> HI, folks,
>>>>
>>>> I am trying to enable block I/O throttling function in libvirt. But
>>>> currently i met some design questions, and don't make sure if we
>>>> should extend blkiotune to support block I/O throttling or introduce
>>>> one new libvirt command "blkiothrottle" to cover it or not. If you
>>>> have some better idea, pls don't hesitate to drop your comments.
>>>>
>>>> If one new libvirt command "blkiothrottle" is introduced, I plan to
>>>> design its usage syntax as below:
>>>>
>>>> virsh # help blkiothrottle
>>>> NAME
>>>> blkiothrottle - Set or display a block disk I/O throttle setting.
>>>>
>>>> SYNOPSIS
>>>> blkiothrottle<domain> <device> [--bps<number>] [--bps_rd
>>>> <number>] [--bps_wr<number>] [--iops<number>] [--iops_rd<number>]
>>>> [--iops_wr<number>]
>>>>
>>>> DESCRIPTION
>>>> Set or display a block disk I/O throttle setting.
>>>>
>>>> OPTIONS
>>>> [--domain]<string> domain name, id or uuid
>>>> [--device]<string> block device
>>>> --bps<number> total throughput limits in bytes/s
>>>> --bps_rd<number> read throughput limits in bytes/s
>>>> --bps_wr<number> write throughput limits in bytes/s
>>>> --iops<number> total operation limits in numbers/s
>>>> --iops_rd<number> read operation limits in numbers/s
>>>> --iops_wr<number> write operation limits in numbers/s
>>>>
>>> How to display the current I/O throttle setting of a specific block
>>> device
>>> here?
>>
>> It will show as below:
>> virtio0: bps=xxx, bps_rd=xxx, bps_wr=xxx, iops=xxx, iops_rd=xxx,
>> iops_wr=xxx.
>
> With which options to the command? I guess "blkiothrottle <domain>
> <device>" will display the current setting.
Right
>
>
>
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <CAJSP0QW1CPCokX=F5z7y==vn1S4wH0VtOaQ7oj4kC7f7uQM4MQ@mail.gmail.com>]
* [Qemu-devel] [RFC] block I/O throttling: how to enable in libvirt
@ 2011-09-01 5:05 Zhi Yong Wu
2011-09-01 8:11 ` Stefan Hajnoczi
0 siblings, 1 reply; 12+ messages in thread
From: Zhi Yong Wu @ 2011-09-01 5:05 UTC (permalink / raw)
To: libvir-list; +Cc: stefanha, agl, qemu-devel, zwu.kernel, guijianfeng, hutao
----- Forwarded message from Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> -----
Date: Thu, 1 Sep 2011 11:55:17 +0800
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "Daniel P. Berrange" <berrange@redhat.com>, Stefan Hajnoczi
<stefanha@gmail.com>, Adam Litke <agl@us.ibm.com>, Zhi Yong Wu
<wuzhy@linux.vnet.ibm.com>, QEMU Developers <qemu-devel@nongnu.org>,
guijianfeng@cn.fujitsu.com, hutao@cn.fujitsu.com
Subject: [RFC] block I/O throttling: how to enable in libvirt
Message-ID: <20110901035517.GD16985@f15.cn.ibm.com>
References: <CAEH94Li_C=BOe2gV8NyM48njYWMBAo9MTGc1eUOh-Y=cODs6VA@mail.gmail.com>
<CAJSP0QW1CPCokX=F5z7y==vn1S4wH0VtOaQ7oj4kC7f7uQM4MQ@mail.gmail.com>
<20110830134636.GB29130@aglitke.rchland.ibm.com>
<CAJSP0QUHm=y8XJC_KXRg7ufFZt3K_XDDfQb--sxjC+c0GjO8qg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAJSP0QUHm=y8XJC_KXRg7ufFZt3K_XDDfQb--sxjC+c0GjO8qg@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Xagent-From: wuzhy@linux.vnet.ibm.com
X-Xagent-To: wuzhy@linux.vnet.ibm.com
X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGENTU7 at VMSDVMA)
On Wed, Aug 31, 2011 at 08:18:19AM +0100, Stefan Hajnoczi wrote:
>Subject: Re: The design choice for how to enable block I/O throttling
> function in libvirt
>From: Stefan Hajnoczi <stefanha@gmail.com>
>To: Adam Litke <agl@us.ibm.com>
>Cc: libvir-list@redhat.com, "Daniel P. Berrange" <berrange@redhat.com>, Zhi
> Yong Wu <wuzhy@linux.vnet.ibm.com>, Zhi Yong Wu <zwu.kernel@gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: quoted-printable
>X-Brightmail-Tracker: AAAAAA==
>X-Xagent-From: stefanha@gmail.com
>X-Xagent-To: wuzhy@linux.vnet.ibm.com
>X-Xagent-Gateway: bldgate.vnet.ibm.com (XAGENTU7 at BLDGATE)
>
>On Tue, Aug 30, 2011 at 2:46 PM, Adam Litke <agl@us.ibm.com> wrote:
>> On Tue, Aug 30, 2011 at 09:53:33AM +0100, Stefan Hajnoczi wrote:
>>> On Tue, Aug 30, 2011 at 3:55 AM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote:
>>> > I am trying to enable block I/O throttling function in libvirt. But
>>> > currently i met some design questions, and don't make sure if we
>>> > should extend blkiotune to support block I/O throttling or introduce
>>> > one new libvirt command "blkiothrottle" to cover it or not. If you
>>> > have some better idea, pls don't hesitate to drop your comments.
>>>
>>> A little bit of context: this discussion is about adding libvirt
>>> support for QEMU disk I/O throttling.
>>
>> Thanks for the additional context Stefan.
>>
>>> Today libvirt supports the cgroups blkio-controller, which handles
>>> proportional shares and throughput/iops limits on host block devices.
>>> blkio-controller does not support network file systems (NFS) or other
>>> QEMU remote block drivers (curl, Ceph/rbd, sheepdog) since they are
>>> not host block devices. QEMU I/O throttling works with all types of
>>> -drive and therefore complements blkio-controller.
>>
>> The first question that pops into my mind is: Should a user need to understand
>> when to use the cgroups blkio-controller vs. the QEMU I/O throttling method? In
>> my opinion, it would be nice if libvirt had a single interface for block I/O
>> throttling and libvirt would decide which mechanism to use based on the type of
>> device and the specific limits that need to be set.
>
>Yes, I agree it would be simplest to pick the right mechanism,
>depending on the type of throttling the user wants. More below.
>
>>> I/O throttling can be applied independently to each -drive attached to
>>> a guest and supports throughput/iops limits. For more information on
>>> this QEMU feature and a comparison with blkio-controller, see Ryan
>>> Harper's KVM Forum 2011 presentation:
>>
>>> http://www.linux-kvm.org/wiki/images/7/72/2011-forum-keep-a-limit-on-it-io-throttling-in-qemu.pdf
>>
>> From the presentation, it seems that both the cgroups method the the qemu method
>> offer comparable control (assuming a block device) so it might possible to apply
>> either method from the same API in a transparent manner. Am I correct or are we
>> suggesting that the Qemu throttling approach should always be used for Qemu
>> domains?
>
>QEMU I/O throttling does not provide a proportional share mechanism.
>So you cannot assign weights to VMs and let them receive a fraction of
>the available disk time. That is only supported by cgroups
>blkio-controller because it requires a global view which QEMU does not
>have.
>
>So I think the two are complementary:
>
>If proportional share should be used on a host block device, use
>cgroups blkio-controller.
>Otherwise use QEMU I/O throttling.
Stefan,
Do you agree with introducing one new libvirt command blkiothrottle now?
If so, i will work on the code draft to make it work.
Daniel and other maintainers,
If you are available, can you make some comments for us?:)
Regards,
Zhi Yong Wu
>
>Stefan
----- End forwarded message -----
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] block I/O throttling: how to enable in libvirt
2011-09-01 5:05 Zhi Yong Wu
@ 2011-09-01 8:11 ` Stefan Hajnoczi
2011-09-01 8:49 ` Daniel P. Berrange
2011-09-02 1:16 ` Gui Jianfeng
0 siblings, 2 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2011-09-01 8:11 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: libvir-list, guijianfeng, agl, qemu-devel, zwu.kernel, hutao
On Thu, Sep 01, 2011 at 01:05:31PM +0800, Zhi Yong Wu wrote:
> On Wed, Aug 31, 2011 at 08:18:19AM +0100, Stefan Hajnoczi wrote:
> >On Tue, Aug 30, 2011 at 2:46 PM, Adam Litke <agl@us.ibm.com> wrote:
> >> On Tue, Aug 30, 2011 at 09:53:33AM +0100, Stefan Hajnoczi wrote:
> >>> I/O throttling can be applied independently to each -drive attached to
> >>> a guest and supports throughput/iops limits. For more information on
> >>> this QEMU feature and a comparison with blkio-controller, see Ryan
> >>> Harper's KVM Forum 2011 presentation:
> >>
> >>> http://www.linux-kvm.org/wiki/images/7/72/2011-forum-keep-a-limit-on-it-io-throttling-in-qemu.pdf
> >>
> >> From the presentation, it seems that both the cgroups method the the qemu method
> >> offer comparable control (assuming a block device) so it might possible to apply
> >> either method from the same API in a transparent manner. Am I correct or are we
> >> suggesting that the Qemu throttling approach should always be used for Qemu
> >> domains?
> >
> >QEMU I/O throttling does not provide a proportional share mechanism.
> >So you cannot assign weights to VMs and let them receive a fraction of
> >the available disk time. That is only supported by cgroups
> >blkio-controller because it requires a global view which QEMU does not
> >have.
> >
> >So I think the two are complementary:
> >
> >If proportional share should be used on a host block device, use
> >cgroups blkio-controller.
> >Otherwise use QEMU I/O throttling.
> Stefan,
>
> Do you agree with introducing one new libvirt command blkiothrottle now?
> If so, i will work on the code draft to make it work.
No, I think that the blkiotune command should be extended to support
QEMU I/O throttling. This is not new functionality, we already have
cgroups blkio-controller support today. Therefore I think it makes
sense to keep a unified interface instead of adding a new command.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] block I/O throttling: how to enable in libvirt
2011-09-01 8:11 ` Stefan Hajnoczi
@ 2011-09-01 8:49 ` Daniel P. Berrange
2011-09-02 1:16 ` Gui Jianfeng
1 sibling, 0 replies; 12+ messages in thread
From: Daniel P. Berrange @ 2011-09-01 8:49 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: libvir-list, guijianfeng, agl, qemu-devel, zwu.kernel,
Zhi Yong Wu, hutao
On Thu, Sep 01, 2011 at 09:11:49AM +0100, Stefan Hajnoczi wrote:
> On Thu, Sep 01, 2011 at 01:05:31PM +0800, Zhi Yong Wu wrote:
> > On Wed, Aug 31, 2011 at 08:18:19AM +0100, Stefan Hajnoczi wrote:
> > >On Tue, Aug 30, 2011 at 2:46 PM, Adam Litke <agl@us.ibm.com> wrote:
> > >> On Tue, Aug 30, 2011 at 09:53:33AM +0100, Stefan Hajnoczi wrote:
> > >>> I/O throttling can be applied independently to each -drive attached to
> > >>> a guest and supports throughput/iops limits. For more information on
> > >>> this QEMU feature and a comparison with blkio-controller, see Ryan
> > >>> Harper's KVM Forum 2011 presentation:
> > >>
> > >>> http://www.linux-kvm.org/wiki/images/7/72/2011-forum-keep-a-limit-on-it-io-throttling-in-qemu.pdf
> > >>
> > >> From the presentation, it seems that both the cgroups method the the qemu method
> > >> offer comparable control (assuming a block device) so it might possible to apply
> > >> either method from the same API in a transparent manner. Am I correct or are we
> > >> suggesting that the Qemu throttling approach should always be used for Qemu
> > >> domains?
> > >
> > >QEMU I/O throttling does not provide a proportional share mechanism.
> > >So you cannot assign weights to VMs and let them receive a fraction of
> > >the available disk time. That is only supported by cgroups
> > >blkio-controller because it requires a global view which QEMU does not
> > >have.
> > >
> > >So I think the two are complementary:
> > >
> > >If proportional share should be used on a host block device, use
> > >cgroups blkio-controller.
> > >Otherwise use QEMU I/O throttling.
> > Stefan,
> >
> > Do you agree with introducing one new libvirt command blkiothrottle now?
> > If so, i will work on the code draft to make it work.
>
> No, I think that the blkiotune command should be extended to support
> QEMU I/O throttling. This is not new functionality, we already have
> cgroups blkio-controller support today. Therefore I think it makes
> sense to keep a unified interface instead of adding a new command.
Agreed, the virDomainGetBlkioParameters/virDomainSetBlkioParameters
APIs, and blkio virsh command are intended to be a generic interface
for setting any block related tuning parameters, regardless of what
the underling implementation is. So any use of QEMU I/O throttling
features should be added to those APIs/commands.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] block I/O throttling: how to enable in libvirt
2011-09-01 8:11 ` Stefan Hajnoczi
2011-09-01 8:49 ` Daniel P. Berrange
@ 2011-09-02 1:16 ` Gui Jianfeng
1 sibling, 0 replies; 12+ messages in thread
From: Gui Jianfeng @ 2011-09-02 1:16 UTC (permalink / raw)
To: Stefan Hajnoczi, Zhi Yong Wu
Cc: libvir-list, hutao, qemu-devel, zwu.kernel, agl
On 2011-9-1 16:11, Stefan Hajnoczi wrote:
> On Thu, Sep 01, 2011 at 01:05:31PM +0800, Zhi Yong Wu wrote:
>> On Wed, Aug 31, 2011 at 08:18:19AM +0100, Stefan Hajnoczi wrote:
>>> On Tue, Aug 30, 2011 at 2:46 PM, Adam Litke <agl@us.ibm.com> wrote:
>>>> On Tue, Aug 30, 2011 at 09:53:33AM +0100, Stefan Hajnoczi wrote:
>>>>> I/O throttling can be applied independently to each -drive attached to
>>>>> a guest and supports throughput/iops limits. For more information on
>>>>> this QEMU feature and a comparison with blkio-controller, see Ryan
>>>>> Harper's KVM Forum 2011 presentation:
>>>>
>>>>> http://www.linux-kvm.org/wiki/images/7/72/2011-forum-keep-a-limit-on-it-io-throttling-in-qemu.pdf
>>>>
>>>> From the presentation, it seems that both the cgroups method the the qemu method
>>>> offer comparable control (assuming a block device) so it might possible to apply
>>>> either method from the same API in a transparent manner. Am I correct or are we
>>>> suggesting that the Qemu throttling approach should always be used for Qemu
>>>> domains?
>>>
>>> QEMU I/O throttling does not provide a proportional share mechanism.
>>> So you cannot assign weights to VMs and let them receive a fraction of
>>> the available disk time. That is only supported by cgroups
>>> blkio-controller because it requires a global view which QEMU does not
>>> have.
>>>
>>> So I think the two are complementary:
>>>
>>> If proportional share should be used on a host block device, use
>>> cgroups blkio-controller.
>>> Otherwise use QEMU I/O throttling.
>> Stefan,
>>
>> Do you agree with introducing one new libvirt command blkiothrottle now?
>> If so, i will work on the code draft to make it work.
>
> No, I think that the blkiotune command should be extended to support
> QEMU I/O throttling. This is not new functionality, we already have
> cgroups blkio-controller support today. Therefore I think it makes
> sense to keep a unified interface instead of adding a new command.
Agreed.
Proportional controlling interfaces and throttling interfaces are all
the same cgroup subsystem. So Just extend blkiotune to add new options
to support throttling tuning.
Thanks,
Gui
>
> Stefan
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-09-02 1:16 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-30 2:55 [Qemu-devel] The design choice for how to enable block I/O throttling function in libvirt Zhi Yong Wu
2011-08-30 7:18 ` [Qemu-devel] [libvirt] " shu ming
2011-08-30 8:10 ` Zhi Yong Wu
2011-08-30 8:31 ` shu ming
2011-08-30 8:36 ` Zhi Yong Wu
[not found] ` <CAJSP0QW1CPCokX=F5z7y==vn1S4wH0VtOaQ7oj4kC7f7uQM4MQ@mail.gmail.com>
[not found] ` <20110830134636.GB29130@aglitke.rchland.ibm.com>
[not found] ` <CAJSP0QUHm=y8XJC_KXRg7ufFZt3K_XDDfQb--sxjC+c0GjO8qg@mail.gmail.com>
2011-09-01 3:55 ` [Qemu-devel] [RFC] block I/O throttling: how to enable " Zhi Yong Wu
2011-09-01 4:21 ` Osier Yang
2011-09-01 4:51 ` Zhi Yong Wu
2011-09-01 5:05 Zhi Yong Wu
2011-09-01 8:11 ` Stefan Hajnoczi
2011-09-01 8:49 ` Daniel P. Berrange
2011-09-02 1:16 ` Gui Jianfeng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.