Total Pageviews

My YouTube Channel

Thursday, 3 May 2012

Hyper-threading on VMware vSphere Virtual Machine Properties

Hyper-threading :

Hyper-threading is an Intel-proprietary technology used to improve parallelization of computations. For each processor core that is physically present, the Operating System  addresses two logical processors, and shares the workload between them when possible. With Hyper-threading a single processor core can execute two independent threads simultaneously . Performance improvements on hyper-threaded machines are dependent on the application and work loads . We might see slight performance improvements in certain applications while certain application performance might degrade as cache is shared between logical processors .

To enable or not to enable Hyper-threading on Hypervisor hosts has always been a debatable question with no clear winners .  HT cannot double the performance of a processor but it can certainly help in improving the performance slightly depending on the work load .

I have tried to consolidate and mention some considerations that would help administrators decide if to enable / disable  HT .

Hyper-threading has to be enabled in BIOS as well as in ESX . By default , HT is enabled in ESX
ESX can intelligently determine if a system  is enabled for hyper-threading and can load balance evenly across all cores of a processor.
Logical processors or threads on the same core will have consecutive numbers such as ,  for example CPU 0 and CPU 1 are on the first core of a processor . This has to be taken into account if CPU Affinity settings are used for Virtual machines
VMs are preferentially scheduled on two different cores rather than two logical processors on the same core .
In ESX , Administrators will be able to define HT core sharing options for individual VM’s in Advanced CPU option available in Resources tab while selecting individual Virtual machine’s Settings . Three options that are available would be :

Any – Default for all VM’s on a HT System . Virtual CPU of a VM can share cores with other Virtual CPU of the same VM as well Virtual CPU of other VM’s on the host.

None – Virtual CPU of a VM can never share core with other Virtual CPU of the same VM as well as Virtual CPU of other VM’s on the host.

Internal – Virtual CPU of a VM can share core only with other Virtual CPU of the same Virtual Machine.

Never bind two CPU intensive VMs to two logical processor of same core as it will be difficult to meet the resource demands of these intensive workloads

To conclude , From my personal experience , we have never enabled Hyper-threading in VI3 environments. With VI4 , We have enabled HT in certain environments and although we do not see much improvement in terms of performance we don’t see negative impact as well .  Enabling / Disabling Hyper-threading is a decision that is left to the administrators to decide after carefully analyzing their environments and work loads that constitutes them .