VM Prioritization: CPU units won't work for me

martin2089

Member
May 8, 2021
8
2
8
Hey,

I’m running the newest PVE (6.4-5) with a Ryzen 5 3600.
This Server is running multiple VMs and LXC Containers.
I've given every VM the full amount of cores - 12.

One VM is encoding Videos with a high CPU usage. But it doesn't need to do that with a very high priority - but when the Server is not used otherwise, it should use 100 % of the Power.
I'm looking for an option to set the priority for the Encoding-VM VERY low, so that other VMs could use almost all the power they want to have for their job.
I know about the CPU limit option - but it doesn't do the job for me, because it limits the CPU Power for the Encoding-VM even if there is nothing else the Server is doing.
The CPU units Option seems to be the right one. I could set the CPU units to 8 (lowest possible) and keep every other VM on the standard 1024. This should give every other VM 128 times more CPU time than the Encoding-VM. But it seems that this option simply does nothing at all. If i trigger a high workload on two VMs with CPU units set to 8/1024, the cpu time seems to get splitted 50/50.

Am I missing something? Is this Feature buggy?
 
Also keep in mind that your host also needs the CPU. If you give a VM 12 of 12 threads and the VMs is using 100% utilization proxmox gets unresponsive, can't hypervise the VMs and the VMs get into problems too. So I wouldn't give a VM more than 10 or 11 threads.
 
Hi, can you verify that values are correctly setup with

"cat /sys/fs/cgroup/cpu/qemu.slice/<vmid>.scope/cpu.shares"

?
Yes, the values are the same as they are in die Proxmox GUI.

Also keep in mind that your host also needs the CPU. If you give a VM 12 of 12 threads and the VMs is using 100% utilization proxmox gets unresponsive, can't hypervise the VMs and the VMs get into problems too. So I wouldn't give a VM more than 10 or 11 threads.
Yes, I hear that a lot. But I have never had significant problems with that. I have just tried If that could be part of the issue I have. Reducing the Corecount for the VMs doesn't change anything.
 
I've just installed the newest updates via apt from today. Still the same.
I've also tried it with different CPU types. kvm64 (which is the standard setting for me) behaves in the same way as the host type does.
Has someone tried it? Does ist work for someone else?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!