VMware vSphere Performance – Part Three: Optimizing ESXi Host CPU

In order to support ESXi on a host system you require a minimum of two CPU cores, but ultimately need to ensure that your host has sufficient CPU resources in order to satisfy CPU demand of the virtual machines and VMkernal. It is also recommended to use CPUs that leverage hardware assisted virtualization as the performance of virtual machines can be significantly improved as the hardware will trap sensitive events and instructions at the hardware offloading the workload from the hypervisor.







First generation enhancements include Intel Virtualization Technology (VT-x) and AMD’s AMD-V which both target privileged instructions with a new CPU execution mode feature that allows the VMM to run in a new root mode below ring 0. As depicted in Figure 7, privileged and sensitive calls are set to automatically trap to the hypervisor, removing the need for either binary translation or paravirtualization. The guest state is stored in Virtual Machine Control Structures (VT-x) or Virtual Machine Control Blocks (AMD-V).

Due to high hypervisor to guest transition overhead and a rigid programming model, VMware’s binary translation approach currently outperforms first generation hardware assist implementations in most circumstances. The rigid programming model in the first generation implementation leaves little room for software flexibility in managing either the frequency or the cost of hypervisor to guest transitions1. Because of this, VMware only takes advantage of these first generation hardware features in limited cases such as for 64-bit guest support on Intel processors.

As well as enabling hardware assisted virtualization (Intel VT-x or AMD-V), it is also recommended to enable the following settings in the BIOS:

  • Ensure all installed CPU sockets and cores are enabled.
  • Intel Turbo Boost – Allows for the CPU to run faster than its thermal design power (TDP) configuration specified frequency when requested by the hypervisor and the CPU is operating below its power, current and temperature limits.
  • Hyperthreading – Allows for two independent threads to run concurrently on a single core.

By default, if hyperthreading is enabled in the BIOS, the ESXi host system will automatically use hyperthreading. However, the default behaviour can be modified on the host system in the vSphere Web client by select a host system and browsing to Manage > Settings > Hardware > Processors  and select Edit and uncheck the hyperthreading enabled option to which the host system will require a restart to apply the change.






To disable ESXi host system from using hyperthreading using PowerCLI, we can invoke the Get-View cmdlet to retrieve the CpuScheduler and initiate the Disable Hyper Threading task.

$HostSystem = "esxi1host.domain.local"

$CpuScheduler = Get-View (Get-View -ViewType HostSystem -Property ConfigManager.CpuScheduler -Filter @{"Name" = $HostSystem}).ConfigManager.CpuScheduler


It is also recommended to disable any hardware devices that will not be used in the BIOS to prevent CPU cycles being used by devices such as a serial port.


One thought on “VMware vSphere Performance – Part Three: Optimizing ESXi Host CPU

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s