From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz2yN-0003k8-Dr for qemu-devel@nongnu.org; Thu, 01 Sep 2011 04:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qz2yL-00049v-GN for qemu-devel@nongnu.org; Thu, 01 Sep 2011 04:50:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz2yL-00048s-95 for qemu-devel@nongnu.org; Thu, 01 Sep 2011 04:50:05 -0400 Date: Thu, 1 Sep 2011 09:49:34 +0100 From: "Daniel P. Berrange" Message-ID: <20110901084934.GA14462@redhat.com> References: <20110901050531.GB17963@f15.cn.ibm.com> <20110901081149.GB14245@stefanha-thinkpad.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20110901081149.GB14245@stefanha-thinkpad.localdomain> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] block I/O throttling: how to enable in libvirt Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: libvir-list@redhat.com, guijianfeng@cn.fujitsu.com, agl@us.ibm.com, qemu-devel@nongnu.org, zwu.kernel@gmail.com, Zhi Yong Wu , hutao@cn.fujitsu.com 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 wrote: > > >> On Tue, Aug 30, 2011 at 09:53:33AM +0100, Stefan Hajnoczi wrote: > > >>> I/O throttling can be applied independently to each -drive attach= ed to > > >>> a guest and supports throughput/iops limits. =C2=A0For more infor= mation on > > >>> this QEMU feature and a comparison with blkio-controller, see Rya= n > > >>> 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 t= he qemu method > > >> offer comparable control (assuming a block device) so it might pos= sible to apply > > >> either method from the same API in a transparent manner. =C2=A0Am = 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 n= ot > > >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, > >=20 > > Do you agree with introducing one new libvirt command blkiothrottle n= ow? > > If so, i will work on the code draft to make it work. >=20 > 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 --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|