VMware Cloud Community
vSohill
Expert
Expert
Jump to solution

CPU hyperthreading

hi,

What is the  advantage of enablig CPU hyperthreading,? Will it be counted in vCPU to CPU ratio ?

0 Kudos
1 Solution

Accepted Solutions
Beingnsxpaddy
Enthusiast
Enthusiast
Jump to solution

vSohill​  I believe this article (NUMA, Hyperthreading and NUMA.PreferHT - frankdenneman.nl )should help you understand how hyper threading and CPU scheduling will work with ESXi, this was written by frankdenneman on ESXi 4.1, but basics remain same.

To understand Hyperthreading please refer the article from Hyperthreading VMware.

I hope this answers your question, if not please revert for more specific question.

Regards Pradhuman VCIX-NV, VCAP-NV, vExpert, VCP2X-DCVNV If my Answer resolved your query don't forget to mark it as "Correct Answer".

View solution in original post

0 Kudos
6 Replies
daphnissov
Immortal
Immortal
Jump to solution

Hyperthreading is a way to *possibly* keep the CPU pipeline more full with requests. It is not a "free" CPU, however, and realistically may only increase results by around 30%. Hyperthreads are generally not counted as a vCPU.

0 Kudos
bluefirestorm
Champion
Champion
Jump to solution

The design of Intel Hyperthreading is such that the two hyperthreads in the same CPU core share the same L1 and L2 caches (which contains the instruction and data caches). As such, you can expect the hyperthread pair can only service the same VM; you cannot expect a hyperthread to jump out to serve a different VM.

0 Kudos
vSohill
Expert
Expert
Jump to solution

Many thanks, If I have 2 CPU x 16 Cores x HT and 64 vCPU is 1:1 vCPU to CPU ?

0 Kudos
IRIX201110141
Champion
Champion
Jump to solution

bluefirestorm

i think youre not right there about that a HT core cannot asign to another VM in the same time, because of the intel design flaws and the latest spectre:L1TF issues VMware offer a new scheduler to strictly avoid that 2 different VMs run on the same Core.

In the past... every core and HT give a  Hardware execution context and a virtual machine monitor can be placed. So your 2x16 Cores x HT ends in 64 logical CPUs.

Regards,

Joerg

0 Kudos
bluefirestorm
Champion
Champion
Jump to solution

As far as I understand HT, whether in the context of virtualisation or plain bare-metal OS, the use of the hyperthread pair is in generally in the hands of the CPU. Since the hyperthread pair share the same L1/L2 cache (as well as execution engine), being able to execute for another VM (or another process thread in a bare metal Windows/Linux OS) would be out of the picture. Even if it could, any advantage would have been lost and turned into a disadvantage as the L1/L2 cache would have to be flushed out and VMexits have to be executed (thus having negative impact to at least two VMs).

@IRIX201110141

As far as the L1TF scheduler, I suppose you are referring to this bullet point from this KB https://kb.vmware.com/s/article/55806

Mitigation of the Concurrent-context attack vector requires enablement of a new feature known as the ESXi Side-Channel-Aware Scheduler. The initial version of this feature will only schedule the hypervisor and VMs on one logical processor of an Intel Hyperthreading-enabled core. This feature may impose a non-trivial performance impact and is not enabled by default. Please see resolution section for details.

It looks like it just means ESXi will avoid using HT altogether.

0 Kudos
Beingnsxpaddy
Enthusiast
Enthusiast
Jump to solution

vSohill​  I believe this article (NUMA, Hyperthreading and NUMA.PreferHT - frankdenneman.nl )should help you understand how hyper threading and CPU scheduling will work with ESXi, this was written by frankdenneman on ESXi 4.1, but basics remain same.

To understand Hyperthreading please refer the article from Hyperthreading VMware.

I hope this answers your question, if not please revert for more specific question.

Regards Pradhuman VCIX-NV, VCAP-NV, vExpert, VCP2X-DCVNV If my Answer resolved your query don't forget to mark it as "Correct Answer".
0 Kudos