Re: Running all my virtual machines with a low priority

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

 



On Thu, May 02, 2019 at 11:33:06AM +0200, Martin Kletzander wrote:
> On Wed, May 01, 2019 at 11:58:23AM +0200, R. Diez wrote:
> > 
> > > You would have to set the priority of all vCPUs in each guest, as well
> > > as emulator threads in each guest (the latter needs very new libvirt).
> > 
> > This does not seem a viable option then with Ubuntu 18.04. And changing XML on all guest VMs is extra work.
> > 
> > Is there no other way? For example, are all such virtual machines not some daemon or systemd unit or set of units? Would it be feasible to lower the
> > priority on all of those? Or is that not easy to do either?
> > 
> 
> I'm not sure if we're resetting all the cgroup values, so it should be possible
> by setting this for the machine.slice cgroup (or somewhere around there) which
> would make it effective for all the VMs, right?  I have not tested it, though,
> sorry.

You could perhaps set  'cpu.shares' cgroup setting on /machine.slice.
This isn't really a nice level in the traditional sense, rather it is
a relative weighting evaluated against other cgroups at the same level.
So if you change it from 1024 to 512, then processes under /machine.slice
will get 1/2 the CPU time vs stuff under /system.slice or /user.slice,
when there is contention for CPU time. 

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

_______________________________________________
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