All of lore.kernel.org
 help / color / mirror / Atom feed
From: RW <kvm@tauceti.net>
To: kvm@vger.kernel.org
Subject: Re: KVM and cpu limiting
Date: Fri, 02 Jul 2010 10:02:03 +0200	[thread overview]
Message-ID: <4C2D9CFB.8090402@tauceti.net> (raw)
In-Reply-To: <AANLkTilSqBK0_PgqBPzPZEqGDbA2vU1s1YfUNHZm_zOt@mail.gmail.com>


> Is it possible to limit cpu usage be VM when using qemu+kvm?
>   

First thing you can do is to only provide one or two
virtual CPUs to a VM. This is normally a not to bad
way to limit CPU usage. But maybe cgroups can help
you more:
http://www.mjmwired.net/kernel/Documentation/cgroups.txt

> I need one server to run a lot of VMs (much more than cpu cores I
> have). Each VM must have it's guaranted cpu time or time slice it must
> use.
>
> Is it possible to make such limits? Is it possible to modify
> /proc/cpuinfo of VMs?
>
>   

You can start Qemu/KVM with different "-cpu" parameter:
bern:~ # qemu-kvm -cpu ?
x86           qemu64
x86           phenom
x86         core2duo
x86            kvm64
x86           qemu32
x86          coreduo
x86              486
x86          pentium
x86         pentium2
x86         pentium3
x86           athlon
x86             n270

Or just provied "-cpu host". Then you get the same output
inside the guest as the host.

- Robert


      parent reply	other threads:[~2010-07-02  8:02 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
2010-07-02  8:02 ` RW [this message]

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=4C2D9CFB.8090402@tauceti.net \
    --to=kvm@tauceti.net \
    --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.