qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limiting per vCPU Usage


From: Daniel P . Berrangé
Subject: Re: Limiting per vCPU Usage
Date: Mon, 21 Sep 2020 09:29:50 +0100
User-agent: Mutt/1.14.6 (2020-07-11)

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 :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]