R. Diez
2019-May-01 09:58 UTC
Re: [libvirt-users] Running all my virtual machines with a low priority
> 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? Thanks again, rdiez
Martin Kletzander
2019-May-02 09:33 UTC
Re: [libvirt-users] Running all my virtual machines with a low priority
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.>Thanks again, > rdiez > >_______________________________________________ >libvirt-users mailing list >libvirt-users@redhat.com >https://www.redhat.com/mailman/listinfo/libvirt-users
Daniel P. Berrangé
2019-May-02 09:43 UTC
Re: [libvirt-users] Running all my virtual machines with a low priority
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 :|
Reasonably Related Threads
- Re: Running all my virtual machines with a low priority
- Re: Running all my virtual machines with a low priority
- Re: Running all my virtual machines with a low priority
- Running all my virtual machines with a low priority
- Re: Running all my virtual machines with a low priority