From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRQv4-0002p9-0Y for qemu-devel@nongnu.org; Tue, 31 May 2011 11:31:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRQuy-0007sI-Ea for qemu-devel@nongnu.org; Tue, 31 May 2011 11:31:45 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:34206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRQuy-0007qf-9D for qemu-devel@nongnu.org; Tue, 31 May 2011 11:31:40 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e33.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4VFNxhP026743 for ; Tue, 31 May 2011 09:23:59 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4VFW3ns177206 for ; Tue, 31 May 2011 09:32:05 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4V9TXHN022159 for ; Tue, 31 May 2011 03:29:37 -0600 Date: Tue, 31 May 2011 10:28:57 -0500 From: Ryan Harper Message-ID: <20110531152857.GW22223@us.ibm.com> References: <20110530050923.GF18832@f12.cn.ibm.com> <20110531134537.GE16382@redhat.com> <20110531135646.GF17656@redhat.com> <20110531141037.GG16382@redhat.com> <20110531141956.GH17656@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110531141956.GH17656@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, Anthony Liguori , 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, Ryan A Harper , Vivek Goyal * Daniel P. Berrange [2011-05-31 09:25]: > On Tue, May 31, 2011 at 10:10:37AM -0400, Vivek Goyal wrote: > > 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). > > No, it isn't about putting limits on a disk independant of a VM. It is > about one VM having multiple disks, and wanting to set different policies > for each of its virtual disks. eg > > qemu-kvm -drive file=/dev/sda1 -drive file=/dev/sdb3 > > and wanting to say that sda1 is limited to 10 MB/s, while sdb3 is > limited to 50 MB/s. You can't do that kind of thing with cgroups, > because it can only control the entire process, not individual > resources within the process. yes, but with files: qemu-kvm -drive file=/path/to/local/vm/images -drive file=/path/to/shared/storage -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com