All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>,
	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
Subject: Re: [Qemu-devel][RFC]QEMU disk I/O limits
Date: Tue, 31 May 2011 15:19:56 +0100	[thread overview]
Message-ID: <20110531141956.GH17656@redhat.com> (raw)
In-Reply-To: <20110531141037.GG16382@redhat.com>

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.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
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 <wuzhy@linux.vnet.ibm.com>,
	luowenj@cn.ibm.com, zhanx@cn.ibm.com, zhaoyang@cn.ibm.com,
	llim@redhat.com, raharper@us.ibm.com
Subject: Re: [Qemu-devel] [RFC]QEMU disk I/O limits
Date: Tue, 31 May 2011 15:19:56 +0100	[thread overview]
Message-ID: <20110531141956.GH17656@redhat.com> (raw)
In-Reply-To: <20110531141037.GG16382@redhat.com>

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.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2011-05-31 14:20 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30  5:09 [Qemu-devel][RFC]QEMU disk I/O limits Zhi Yong Wu
2011-05-30  5:09 ` [Qemu-devel] [RFC]QEMU " Zhi Yong Wu
2011-05-31 13:45 ` [Qemu-devel][RFC]QEMU " Vivek Goyal
2011-05-31 13:45   ` [Qemu-devel] [RFC]QEMU " Vivek Goyal
2011-05-31 13:50   ` Anthony Liguori
2011-05-31 13:50     ` [Qemu-devel] " Anthony Liguori
2011-05-31 14:04     ` Vivek Goyal
2011-05-31 14:04       ` [Qemu-devel] " Vivek Goyal
2011-05-31 14:25       ` Anthony Liguori
2011-05-31 17:59         ` Vivek Goyal
2011-05-31 17:59           ` Vivek Goyal
2011-05-31 18:39           ` Anthony Liguori
2011-05-31 18:39             ` Anthony Liguori
2011-05-31 19:24             ` Vivek Goyal
2011-05-31 19:24               ` Vivek Goyal
2011-05-31 23:30               ` Anthony Liguori
2011-06-01 13:20                 ` Vivek Goyal
2011-06-01 21:15                   ` Stefan Hajnoczi
2011-06-01 21:15                     ` Stefan Hajnoczi
2011-06-01 21:42                     ` Vivek Goyal
2011-06-01 21:42                       ` Vivek Goyal
2011-06-01 22:28                       ` Stefan Hajnoczi
2011-06-01 22:28                         ` Stefan Hajnoczi
2011-06-04  8:54                 ` Blue Swirl
2011-06-04  8:54                   ` Blue Swirl
2011-05-31 20:48             ` Mike Snitzer
2011-05-31 20:48               ` [Qemu-devel] " Mike Snitzer
2011-05-31 22:22               ` Anthony Liguori
2011-05-31 13:56   ` [Qemu-devel][RFC]QEMU " Daniel P. Berrange
2011-05-31 13:56     ` [Qemu-devel] [RFC]QEMU " Daniel P. Berrange
2011-05-31 14:10     ` [Qemu-devel][RFC]QEMU " Vivek Goyal
2011-05-31 14:10       ` [Qemu-devel] [RFC]QEMU " Vivek Goyal
2011-05-31 14:19       ` Daniel P. Berrange [this message]
2011-05-31 14:19         ` Daniel P. Berrange
2011-05-31 14:28         ` [Qemu-devel][RFC]QEMU " Vivek Goyal
2011-05-31 14:28           ` [Qemu-devel] [RFC]QEMU " Vivek Goyal
2011-05-31 15:28         ` [Qemu-devel][RFC]QEMU " Ryan Harper
2011-05-31 15:28           ` [Qemu-devel] [RFC]QEMU " Ryan Harper
2011-05-31 19:55 ` [Qemu-devel][RFC]QEMU " Vivek Goyal
2011-05-31 19:55   ` [Qemu-devel] [RFC]QEMU " Vivek Goyal
2011-06-01  3:12   ` Zhi Yong Wu
2011-06-01  3:12     ` Zhi Yong Wu
2011-06-02  9:33     ` Michal Suchanek
2011-06-02  9:33       ` Michal Suchanek
2011-06-03  6:56       ` Zhi Yong Wu
2011-06-03  6:56         ` Zhi Yong Wu
2011-06-01  3:19   ` Zhi Yong Wu
2011-06-01  3:19     ` Zhi Yong Wu
2011-06-01 13:32     ` Vivek Goyal
2011-06-02  6:07       ` Zhi Yong Wu
2011-06-02  6:17 ` Sasha Levin
2011-06-02  6:17   ` Sasha Levin
2011-06-02  6:29   ` Zhi Yong Wu
2011-06-02  7:15     ` Sasha Levin
2011-06-02  8:18       ` Zhi Yong Wu
2011-06-02  8:18         ` Zhi Yong Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110531141956.GH17656@redhat.com \
    --to=berrange@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=llim@redhat.com \
    --cc=luowenj@cn.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=raharper@us.ibm.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=vgoyal@redhat.com \
    --cc=wuzhy@cn.ibm.com \
    --cc=wuzhy@linux.vnet.ibm.com \
    --cc=zhanx@cn.ibm.com \
    --cc=zhaoyang@cn.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.