Tips on core assignment to VMs

tenstareri

New Member
Sep 29, 2025
12
1
3
The hardware in question is
* AMD Ryzen 9 7950X3D 16-Core Processor
* 128GB RAM
* 3 Windows VMs

Each VM compiles code so they can technically make use of all assigned cores when needed. Sometimes all 3 are in use at the same time, though it is rare that they all are doing very heavy jobs at the exact same time. When assigning 32 CPUs to each VM, I think I am observing that they fight over the same resources. At the moment each is assigned 16 cores/vCPUs.

Based on this context, what does the chat recommend that each VM gets?
 
When assigning 32 CPUs to each VM

That's... not good, it is worst case! I would give it max. 14 cores and call it a day.

Of course: ymmv. You have the hardware available --> just test it ;-)
 
Thank you UdoB for your thoughts! What about Proxmox itself, how much CPU time does it need? Lets say if one would give a single VM all the threads on the CPU (and a workload that would make use of all of them), does that then somehow starve the scheduling component of the Proxmox host somehow?
 
What about Proxmox itself, how much CPU time does it need?
I have no idea. Personally I would make sure that two to four cores are available even when the largest VM is running.

My (possibly wrong, I am no guru) understanding is: you have three VMs with 14 cores. Now if all three have "something" to do only two of them can run at the very same time while the third has to wait to get CPU time assigned. Under all circumstances four cores are available for the host (or for another, fourth VM).

Lets say if one would give a single VM all the threads on the CPU (and a workload that would make use of all of them), does that then somehow starve the scheduling component of the Proxmox host somehow?

The hidden detail is: to switch context all assigned cores have to available at the very same time. Giving a single VM (or three of them) 32 cores would result in a situation were always only one process/task can be executed. Even if the host has little to do and a single core would be sufficient it has to wait for the 32-core-VM to run out of its time-slice before a context switch can happen. Instead of a multi-tasking system you now have a only-one-single-task-can-run behavior. Of course this is slower...

From the user's point of view all three VMs would run at the same time, but slower than expected. How much slower I can't tell.

You have the equipment. Run some tests! And report your findings here :-)
 
Hi UboB, thank you for the response, I have one follow up question.
to switch context all assigned cores have to available at the very same time.
So if 2 VMs both have the 32 cores assigned, they will never do anything in parallel?
 
So if 2 VMs both have the 32 cores assigned, they will never do anything in parallel?
Correct.

Both are running in the time sliced fashion and a normal user will be able to use both. But technically in a specific microsecond only one can be running.