[Date Prev][Date Next] [Thread Prev][Thread Next]
[libvirt] [RFC] block I/O throttling: how to enable in libvirt
- From: Zhi Yong Wu <wuzhy linux vnet ibm com>
- To: libvir-list redhat com
- Cc: qemu-devel nongnu org
- Subject: [libvirt] [RFC] block I/O throttling: how to enable in libvirt
- Date: Thu, 1 Sep 2011 13:05:31 +0800
----- 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>
Content-Type: text/plain; charset=utf-8
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
>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:
>> 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
>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
>So I think the two are complementary:
>If proportional share should be used on a host block device, use
>Otherwise use QEMU I/O throttling.
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?:)
Zhi Yong Wu
----- End forwarded message -----
[Date Prev][Date Next] [Thread Prev][Thread Next]