Hyperthreading On Vsphere ESXi Hosts

Posted on Posted in ESXi

Hyper-threading is a feature in the latest INTEL NEHALEM series. This feature make each physical core to double. For example with Hyperthrading, if you have 2 physical cores then you have 4 Logical Cores. Having double the logical processors does not boost the performance by 100% but it just makes processors more efficient and in some cases help to achieve a gain of 20%. But it still plays a great role when deployed in Vsphere Virtual Infrastructure.

To enable hyperthreading in vsphere, for first step you should enable it from the BIOS of the system on which you have the ESXi installed (Not all processors have Hyperthreading Support).

When enabled from the BIOS the hyperthreading for the esxi can be enabled from ESXi host -> Configuration -> Processors and check Enabled.

Based on above picture, we have 2 socket (physical Processors) with 12 cores each, then with Hyperthreading we have 48 logical processors.

Please note that after enable hyperthreading, server restart is required. so better enable it when ESXi instalation is done.

The hyperthreading option can be set on an individual basis for a particular vm as well. Right click the VM -> Resources -> Advanced CPU.

 

 

 

 

There is 3 options for hyperthreading core sharing mode:

1) Any

Setting to any mode allows VMs to share virtual core from other VMs as well. This is set by default.

2) None

Machine get exclusive access to the core the other thread who wants to access the core has to wait.

3) Internal

VMs are allowed to share cores from the same physical cores.


Another setting is the CPU affinity. CPU affinity is like hardcoding the cpu core to the machine. The best practice is to avoid CPU affinity and let hypervisor to choose the cores. If you want to choose the cores yourself try choosing as much cores as possible. So select logical processores and use "-" for a range and " , " for separate values . If none of Cores are free then machines produces a CPU READY delay. This Setting is not available when the machines are part of a DRS cluster.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *