CPU assignment priority

paszczakojad

New Member
Mar 18, 2023
12
0
1
Hi,

I have a proxmox server with 2 CPUs, 6 HT cores each (so there are 24 CPUs seen by the host system). There are 5 VMs. One VM is a backup for another server and sits quietly for most of the time. Other four VMs should have CPU power divided evenly. But when the backup server is needed I'd like to assign the most of the CPU power to it and "subdue" the remaining VMs (if I had to assign physical cores - I would like to assign 20 cores to backup server and for the rest VMs 1 core each).

How to configure that?

Best regards,

Piotr
 
Have a look at "CPU units":
cpuunits (nowadays often called CPU shares or CPU weight), controls how much CPU time a VM gets compared to other running VMs. It is a relative weight which defaults to 100 (or 1024 if the host uses legacy cgroup v1). If you increase this for a VM it will be prioritized by the scheduler in comparison to other VMs with lower weight. For example, if VM 100 has set the default 100 and VM 200 was changed to 200, the latter VM 200 would receive twice the CPU bandwidth than the first VM 100.
For more information see man systemd.resource-control, here CPUQuota corresponds to cpulimit and CPUWeight corresponds to our cpuunits setting, visit its Notes section for references and implementation details.
 

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!