0

I've a kind of specific question that I was unable to find an answer for in the official documentation of VMware or on some other very useful threads here on this platform, so here it is:

I've got a host using ESX 6.0 with 2 sockets, each has 6 cores with HT. So in total I'm having 12 cores and 24 Threads on that Hardware.

It is running 10 VM's. I've allocated 34 cores (I know thats bad, but can't change that right now). However, I'm experiencing serious problems with 1 of the VMs, that has 8 cores assigned (2 x 4).

I'm aware of how hyper threading is working and that in an ideal workload an HT-Core would have around 50% of the performance of an "real" core.

So here is my question: Would I benefit from using CPU affinity to make sure, that this Server has 8 "real" (=faster) cores, instead of letting VMware handle cores?

1

Your problem is not HT. 50% HT boost is a number based on nothing. Usually, it can be 5-20% boost to some multi-threaded applications depending on the code and the workload. The point is you should not count on this when allocating cores.

In the case of VMWare, CPUs are considered the real cores and logical processors are considered the HT part.

Example:

Intel(R) Xeon(R) CPU E5-2620 v4 has 8 cores and 16 threads. A Dell server using a dual socket configuration will have 2 of these processors, meaning 16 cores and 32 logical processors (aka threads). So the ESXi host will show: 16 CPUs x Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz

This is exactly what is happening in your case: you have 2 CPUs with 6 cores each, meaning ESXi will have 12 cores to use (and 24 logical processors).

Problems in your case: 34 cores is significantly more than 12 and even more than 24. This is only fine as long as you don't have multiple guests using their allocated CPUs to the maximum.

Assigning 2 cores and 4 sockets is not good, as you have 2 sockets. ESXi can handle the translations but it's better for you to assign 4 CPU cores and 2 sockets. If you really need processing power on that 8-core guest, then you should use the reservation option when allocating the CPUs. That will make sure the other guests will not steal CPU power from your CPU-intensive guest.

5
  • Thanks for your answer, Sir but you are slightly incorrect. If I click on Processor Information on VSphere (yes, 6.0 still has it) I'm seeing the following: 2 Sockets, 6 Process Cores per Socket, 24 Logical Processors. And for each VM I can assign up to 24 Cores. Thats exactly my problem. Also: By "2 x 4" I've meant 2 sockets and 4 cores each, since sockets comes first in the VMware GUI – Hutzi Apr 12 '19 at 8:53
  • 1
    Yes, you can assign up to 24, but doing that for a high load guest means the others are left with no processing power. Btw, in the webui the Cores are listed 1st and then the sockets, that's why I exemplified that part. If that's fine, just do the resource reservation for your important 8-core guest. – Overmind Apr 12 '19 at 9:12
  • Thanks for clarification. I'll use the reservation you mentioned which I didn't thought about before. But still I'm missing the answer to my main question. How do I make sure he's not getting the "slower" hyper threading cores? Lets say I've put him to 24 cores, he's obviously getting 12 real ones and 12 HT ones. But if he's at 8, is he getting 4 real, 4 HT by default? If yes does it make any sence to change that manually by assigning him 8 real ones. – Hutzi Apr 12 '19 at 9:20
  • The load distribution per core is balanced automatically. You can't hit 8 'fake-cores'. So yes, you will get 4 real cores for that machine. Practically, it's like having 4 cores with HT, meaning 8 threads. It would be nice to have a statistic on CPU usage accross all your VMs. I'm sure some aspects could be improved. – Overmind Apr 12 '19 at 9:31
  • Thank you for your answers and effort, Sir. – Hutzi Apr 12 '19 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.