From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [Qemu-devel][RFC]QEMU disk I/O limits Date: Tue, 31 May 2011 10:10:37 -0400 Message-ID: <20110531141037.GG16382@redhat.com> References: <20110530050923.GF18832@f12.cn.ibm.com> <20110531134537.GE16382@redhat.com> <20110531135646.GF17656@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Zhi Yong Wu , qemu-devel@nongnu.org, kvm@vger.kernel.org, kwolf@redhat.com, guijianfeng@cn.fujitsu.com, herbert@gondor.hengli.com.au, stefanha@linux.vnet.ibm.com, aliguori@us.ibm.com, raharper@us.ibm.com, luowenj@cn.ibm.com, wuzhy@cn.ibm.com, zhanx@cn.ibm.com, zhaoyang@cn.ibm.com, llim@redhat.com To: "Daniel P. Berrange" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51242 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055Ab1EaOKv (ORCPT ); Tue, 31 May 2011 10:10:51 -0400 Content-Disposition: inline In-Reply-To: <20110531135646.GF17656@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, May 31, 2011 at 02:56:46PM +0100, Daniel P. Berrange wrote: > On Tue, May 31, 2011 at 09:45:37AM -0400, Vivek Goyal wrote: > > On Mon, May 30, 2011 at 01:09:23PM +0800, Zhi Yong Wu wrote: > > > Hello, all, > > > > > > I have prepared to work on a feature called "Disk I/O limits" for qemu-kvm projeect. > > > This feature will enable the user to cap disk I/O amount performed by a VM.It is important for some storage resources to be shared among multi-VMs. As you've known, if some of VMs are doing excessive disk I/O, they will hurt the performance of other VMs. > > > > > > > Hi Zhiyong, > > > > Why not use kernel blkio controller for this and why reinvent the wheel > > and implement the feature again in qemu? > > The finest level of granularity offered by cgroups apply limits per QEMU > process. So the blkio controller can't be used to apply controls directly > to individual disks used by QEMU, only the VM as a whole. So are multiple VMs using same disk. Then put multiple VMs in same cgroup and apply the limit on that disk. Or if you want to put a system wide limit on a disk, then put all VMs in root cgroup and put limit on root cgroups. I fail to understand what's the exact requirement here. I thought the biggest use case was isolation one VM from other which might be sharing same device. Hence we were interested in putting per VM limit on disk and not a system wide limit on disk (independent of VM). Thanks Vivek From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRPeq-0005X6-UA for qemu-devel@nongnu.org; Tue, 31 May 2011 10:10:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRPel-00086t-1X for qemu-devel@nongnu.org; Tue, 31 May 2011 10:10:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRPek-00086i-Pw for qemu-devel@nongnu.org; Tue, 31 May 2011 10:10:51 -0400 Date: Tue, 31 May 2011 10:10:37 -0400 From: Vivek Goyal Message-ID: <20110531141037.GG16382@redhat.com> References: <20110530050923.GF18832@f12.cn.ibm.com> <20110531134537.GE16382@redhat.com> <20110531135646.GF17656@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110531135646.GF17656@redhat.com> Subject: Re: [Qemu-devel] [RFC]QEMU disk I/O limits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org, guijianfeng@cn.fujitsu.com, qemu-devel@nongnu.org, wuzhy@cn.ibm.com, herbert@gondor.hengli.com.au, Zhi Yong Wu , luowenj@cn.ibm.com, zhanx@cn.ibm.com, zhaoyang@cn.ibm.com, llim@redhat.com, raharper@us.ibm.com On Tue, May 31, 2011 at 02:56:46PM +0100, Daniel P. Berrange wrote: > On Tue, May 31, 2011 at 09:45:37AM -0400, Vivek Goyal wrote: > > On Mon, May 30, 2011 at 01:09:23PM +0800, Zhi Yong Wu wrote: > > > Hello, all, > > > > > > I have prepared to work on a feature called "Disk I/O limits" for qemu-kvm projeect. > > > This feature will enable the user to cap disk I/O amount performed by a VM.It is important for some storage resources to be shared among multi-VMs. As you've known, if some of VMs are doing excessive disk I/O, they will hurt the performance of other VMs. > > > > > > > Hi Zhiyong, > > > > Why not use kernel blkio controller for this and why reinvent the wheel > > and implement the feature again in qemu? > > The finest level of granularity offered by cgroups apply limits per QEMU > process. So the blkio controller can't be used to apply controls directly > to individual disks used by QEMU, only the VM as a whole. So are multiple VMs using same disk. Then put multiple VMs in same cgroup and apply the limit on that disk. Or if you want to put a system wide limit on a disk, then put all VMs in root cgroup and put limit on root cgroups. I fail to understand what's the exact requirement here. I thought the biggest use case was isolation one VM from other which might be sharing same device. Hence we were interested in putting per VM limit on disk and not a system wide limit on disk (independent of VM). Thanks Vivek