From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyzTx-0000iF-07 for qemu-devel@nongnu.org; Thu, 01 Sep 2011 01:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyzTv-0003XX-CP for qemu-devel@nongnu.org; Thu, 01 Sep 2011 01:06:28 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:44970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyzTu-0003X0-Lc for qemu-devel@nongnu.org; Thu, 01 Sep 2011 01:06:27 -0400 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp03.in.ibm.com (8.14.4/8.13.1) with ESMTP id p8156JlW015635 for ; Thu, 1 Sep 2011 10:36:19 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8156Ijw2121872 for ; Thu, 1 Sep 2011 10:36:18 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8156I2s020126 for ; Thu, 1 Sep 2011 10:36:18 +0530 Date: Thu, 1 Sep 2011 13:05:31 +0800 From: Zhi Yong Wu Message-ID: <20110901050531.GB17963@f15.cn.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC] block I/O throttling: how to enable in libvirt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: libvir-list@redhat.com Cc: stefanha@gmail.com, agl@us.ibm.com, qemu-devel@nongnu.org, zwu.kernel@gmail.com, guijianfeng@cn.fujitsu.com, hutao@cn.fujitsu.com ----- Forwarded message from Zhi Yong Wu ----- Date: Thu, 1 Sep 2011 11:55:17 +0800 From: Zhi Yong Wu To: Stefan Hajnoczi Cc: "Daniel P. Berrange" , Stefan Hajnoczi , Adam Litke , Zhi Yong Wu , QEMU Developers , 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: <20110830134636.GB29130@aglitke.rchland.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=3Dutf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 >To: Adam Litke >Cc: libvir-list@redhat.com, "Daniel P. Berrange" , = Zhi > Yong Wu , Zhi Yong Wu >Content-Type: text/plain; charset=3DISO-8859-1 >Content-Transfer-Encoding: quoted-printable >X-Brightmail-Tracker: AAAAAA=3D=3D >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 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 w= rote: >>> > 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 introduc= e >>> > 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. =C2=A0QEMU I/O throttling works with all type= s of >>> -drive and therefore complements blkio-controller. >> >> The first question that pops into my mind is: Should a user need to un= derstand >> when to use the cgroups blkio-controller vs. the QEMU I/O throttling m= ethod? =C2=A0In >> my opinion, it would be nice if libvirt had a single interface for blo= ck I/O >> throttling and libvirt would decide which mechanism to use based on th= e 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 t= o >>> a guest and supports throughput/iops limits. =C2=A0For more informati= on 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 q= emu method >> offer comparable control (assuming a block device) so it might possibl= e to apply >> either method from the same API in a transparent manner. =C2=A0Am I co= rrect 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 -----