From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Boris Dolgov <boris@dolgov.name>
Cc: kvm@vger.kernel.org, bharata@in.ibm.com,
Balbir Singh <balbir@in.ibm.com>
Subject: Re: Fwd: KVM and cpu limiting
Date: Tue, 6 Jul 2010 10:09:45 +0530 [thread overview]
Message-ID: <20100706043945.GD15598@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTikrTOZpuiCXiOlPvhJJg8AgVp4IkUrFoimjLZF1@mail.gmail.com>
On Fri, Jul 02, 2010 at 08:38:37PM +0400, Boris Dolgov wrote:
> On Fri, Jul 2, 2010 at 11:57 AM, Srivatsa Vaddagiri <vatsa@in.ibm.com> wrote:
> >> Is it possible to limit cpu usage be VM when using qemu+kvm?
> >
> > Have you checked cpu controller?
> It is very interesting. Looks like it is something, that I need.
> So, limiting qemu process will limit cpu usage for the container?
> I think, i will be able to configure it to provide guaranted cpu to
> containers in that way.
Note that shares control how much cpu bandwidth a VM gets _relative_ to other
active VMs and hence is not a absolute measure of how much CPU capacity is
provided to a particular VM. If the number of VMs deployed on a server
and their relative priority remains static in general, then shares can be
used as both "guarantee" and "limit" mechanism.
> But what happens with the VM when qemu process is paused by the
> scheduler? Will this time be counted as idle time for VM's cpu,
No - it should be accounted as "runqueue wait time".
> or it will be added to the state, which was used when qemu process was
> paused?
The runqueue wait time should reflect as "steal" time for the VMs. top command
should show the steal time for a VM (look for 'st'), although I am not 100% sure
whether steal time is reported in case of KVM guests.
> > Why do you want to modify /proc/cpuinfo of VMs?
> Just for information about the limits for the VMs' owners.
Sounds like a cool idea - although not sure whether cpuinfo is the right place.
You can try sending a patch and find out what the community thinks of it!
- vatsa
next prev parent reply other threads:[~2010-07-06 4:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-02 6:23 KVM and cpu limiting Boris Dolgov
[not found] ` <AANLkTinbGi6LOu01xySOiqfml-VFG5TYt7ovXVn7hVlR@mail.gmail.com>
2010-07-02 7:57 ` Fwd: " Srivatsa Vaddagiri
2010-07-02 16:38 ` Boris Dolgov
2010-07-06 4:39 ` Srivatsa Vaddagiri [this message]
2010-07-02 8:02 ` RW
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=20100706043945.GD15598@linux.vnet.ibm.com \
--to=vatsa@in.ibm.com \
--cc=balbir@in.ibm.com \
--cc=bharata@in.ibm.com \
--cc=boris@dolgov.name \
--cc=kvm@vger.kernel.org \
/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.