Re: cgroup for VM - does it work properly?

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

 



On Thu, Mar 06, 2014 at 12:32:28AM +0100, Martin Pavlásek wrote:
> Hi
> 
> I tried to restrict usage of some running VM by cpu.shares (i.e. set to
> 10 from original 1024) on loaded system and it seem doesn't work as I
> expected... all running processes has same CPU usage (by htop) :-/
> Does anyone has same experience?

The cpu.shares variable doesn't provide absolute restriction on
CPU usage, rather it is doing relative prioritization.

eg if you have 2 cgroups that are at the same level in the hierarchy
and you give one shares=512 and one shared=1024, then the latter VM
will get twice the CPU scheduler time of the former. If the latter
VM is completely idle though, the former VM will not be capped in any
way.

If you want absolute caps then you need to use period/quota settings.
Also you want todo this via the   virsh schedinfo   command, not accessing
cgroups directly.

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

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users





[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux