
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.
Thanks for your help. There is no "machine.slice" on my system. This is an excerpt from "systemd-cgls". ??? ??????system.slice ??? ??????irqbalance.service ??? ??? ??????865 /usr/sbin/irqbalance --foreground [... blah blah ...] ??? ??????wpa_supplicant.service ??? ??? ??????878 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant ??? ??????libvirtd.service ??? ??? ?????? 987 /usr/sbin/libvirtd ??? ??? ?????? 1395 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper ??? ??? ?????? 1396 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper ??? ??? ??????12285 /usr/bin/qemu-system-x86_64 -name guest=UbuntuMATE1804,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-UbuntuMATE1804/master-key.aes -machine... But I guess there are differences depending on the libvirt version. I thought of 'nice' because it is an easy way to lower the priority for everything (CPU and disk) at once. This is actually getting too complicated. I am a lone developer and sysadmin in a small company. I would need to learn too many things about control groups etc. One of the reasons I am trying libvirt is because of the "Virtual Machine Manager" GUI. Is there not an easier way? I realised there is a "libvirtd.service" on my system. Is there a simple way in systemd to just lower the priority of everything under that service? I am assuming that this service is starting all the virtual machines. Best regards, rdiez