Virtualising , performance vs efficiency cores

I have been trying to figure out how virtualization works in the new world of 12th Gen Performance and efficiency cores. Generally speaking, but anything specific to XCP-NG helpful too.

How are cores used in this context? For example you might have a mix of loads, like a CCTV VM using quite high load, then a unifi controller using next to nothing. Does Intel and or the hypervisor mix and match cores depending on the load?

How does it determine which core should be used for high vs low loads and what happens if the low load turns out to be a high load. Does it just move processing tasks around the cores on the fly?

Perhaps I’m overthinking something that happens auto-magically in the background but I would be curious to know more.

Are there any practical implications to think about? I used to look at total cores, threads and the passmark to get an idea of what I needed.

From Xen point a view, a VM is like a process. Yes, like your regular process in your “regular” OS. So there’s no problem to get more vCPUs used in total than existing CPU (including threads). There’s some “rules” however:

  • one VM can’t have more vCPUs than the physical machine
  • when you have more vCPUs than actual CPU, Xen will schedule each vCPU like your regular OS will do for a process/thread.

Let’s imagine you have 8 vCPUs on 2 different VMs (=16 vCPUs in total) while having only 8 cores on your physical host. Let’s also imagine those 2x VMs are running 100% of all their vCPUs.

The end result will be: all the load split equally between your VMs, so each one will have 50% of the physical CPUs time. Obviously, it’s just an example and in the real world you also have the dom0 vCPU usage, but you get the concept.

Also, in real life, it’s not common to have all your VMs using 100% CPU, so over-provision is OK. For most load, twice vCPUs per CPU works OK, but YMMV. If you truly want dedicated CPU time, then get less vCPU per CPU.

thanks. I get the general principle. but with the new type of efficiency cores, what determines how they are utilized? is this the CPU or in the hypervisor?

I don’t think the Xeon processors are using e-cores, so it will be interesting to see what the “consumer” processors offer.