VM cpuunits with multiple cores

jared555

New Member
May 29, 2017
2
0
1
35
How are cpuunits balanced when virtual machines have different numbers of cores?

For a simplified example, say I have a two core hypervisor. There are three virtual machines running on the hypervisor. One has two cores and two have one core. All three have 1024 cpuunits, unlimited limit.

In a maximum load scenario, will each machine receive 2/3 of a core or will the two core machine receive an entire core and the other two machines half a core each?

I am trying to figure out a billing scenario where I allow a user to create multiple machines with a maximum combined total cpu power. Ex: Planning for 1024 cpu units per hypervisor core, allow a user to create one machine that uses 2048 units or four that get 512.
 
Hi,

the problem is this are relative and not absolute values.
What means if you have 3 VM's with A 512, B 1024 and C 2048 units.

C have double so much cpu time as B and four times more than A.
But this only works if all your cores are on 100% usage.
This means if your cpu are bored all VM get 100% of the core what they have.

If you need more information search for
"cgroups cpu.shares"
 
Thanks for the response. I just wanted to make sure cpu shares were allocated on a per VM basis and not a per thread/core basis. Seems that per thread cgroup control has been removed so it has to be per VM.
 

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!