[libvirt] Global domain cpu.cfs_quota_us setup

Daniel P. Berrange berrange at redhat.com
Tue Dec 8 09:27:12 UTC 2015


On Mon, Dec 07, 2015 at 03:17:53PM +0300, Alexander Burluka wrote:
> Hello all!
> 
> I would greatly appreciate your help with some cgroup question. Libvirt xml
> has cpu tuning section and quota element in it. That parameter sets up
> cpu.cfs_cgroup_us for every domain's vcpu. I set it to 55555 and has such
> hierarchy of cgroups:
> cpu.cfs_quota_us (-1)
> |
> |-emulator/cpu.cfs_quota_us (-1)
> |-vcpu0/cpu.cfs_quota_us (55555)
> |-vcpu1/cpu.cfs_quota_us (55555)
> |-vcpu2/cpu.cfs_quota_us (55555)
> ....
> \-vcpuN/cpu.cfs_quota_us (55555)
> 
> Is there any way to set up upper level quota limit via libvirt without
> setting every vcpu? So I'd like to get next hierarchy:
> cpu.cfs_quota_us (55555)
> |
> |-emulator/cpu.cfs_quota_us (-1)
> |-vcpu0/cpu.cfs_quota_us (-1)
> |-vcpu1/cpu.cfs_quota_us (-1)
> |-vcpu2/cpu.cfs_quota_us (-1)
> ....
> \-vcpuN/cpu.cfs_quota_us (-1)

If you set it at the level up in the hierarchy, then the default case
ends up with all VMs having the same quota regardless of the number
of vCPUs they have. By setting it against the vcpu, the quota scales
as you hotplug/unplug vCPUs


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




More information about the libvir-list mailing list