From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: Limiting per vCPU Usage
Date: Mon, 21 Sep 2020 09:29:50 +0100 [thread overview]
Message-ID: <20200921082950.GF1942072@redhat.com> (raw)
In-Reply-To: <68336702-cedc-dc38-3d18-d153cd7652dd@kamp.de>
On Sun, Sep 20, 2020 at 10:24:41PM +0200, Peter Lieven wrote:
> Hi Qemu folks,
>
>
> is there a BCP to limit just the maximum usage of a virtual (KVM) cpu?
>
> I know that there are many approaches, but as far as I know they all limit the complete qemu process which is far more
>
> than just the virtual CPUs.
>
> Is it possible to limit just the vCPU threads and leave threads that
> handle the monitor, vnc, qmp, iothreads, storage backend etc.
Libvirt uses cgroups to achieve what you describe. A cgroup for the
QEMU process as a whole, then create child cgroups, one for each
vCPUs, and a further one for non-vCPU threads. CPU limits are then
applied on the child cgroups.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2020-09-21 8:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 20:24 Limiting per vCPU Usage Peter Lieven
2020-09-21 8:29 ` Daniel P. Berrangé [this message]
2020-09-21 13:47 ` Peter Lieven
2020-09-21 14:09 ` Daniel P. Berrangé
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=20200921082950.GF1942072@redhat.com \
--to=berrange@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).