Greetings Virtual Insanity readers!
My name is Jeff and I am Sr. Systems Engineer / Solutions Specialist at VMware. I specialize in virtualizing messaging systems (Microsoft Exchange, Zimbra), databases (Microsoft SQL), ESX Performance, and Security. My posts are my thoughts at the time I write them and do not reflect those of my employer. I reserve the right to change my opinion as technology evolves and I learn about new ways of getting IT done. And please test any settings described in our posts in a test environment to see if how they will impact your production environment.
I recently had a conversation with a colleague of mine regarding hyper-threading which led to this post.
Here is the question: VMware’s Performance Best Practices for vSphere whitepaper recommends enabling hyper-threading in the BIOS (see page 15), but the application vendor recommends disabling hyper-threading, can I enable hyper-threading for the ESX host while disabling hyper-threading for a specific virtual machine? Yes.
The conversation centered around Microsoft’s recommendation to disable hyper-threading for production Exchange installations and configuring a virtual machine to accommodate this recommendation.
TechNet, “Hyper-threading causes capacity planning and monitoring challenges, and as a result, the expected gain in CPU overhead is likely not justified. Hyper-threading should be disabled by default for production Exchange servers and only enabled if absolutely necessary as a temporary measure to increase CPU capacity until additional hardware can be obtained.”
So, how do I go about disabling hyper threading for a specific virtual machine while leaving the option enabled in the BIOS of the ESX host?
The Hyperthreading Sharing option on the properties tab of a virtual machine provides control of whether a virtual machine should be scheduled to share a physical processor given hyper-threading is enabled on the host. There are three (3) options for this setting:
- Any – This is the default setting. The vCPUs of this VM can freely share cores with other virtual CPUs on this or other virtual machines
- None – The vCPUs of this virtual machine have exclusive use of a processor whenever they are scheduled to the core.
- Internal – On a virtual machine with exactly two (2) vCPUs, the two (2) vCPUs are allowed to share one (1) physical core, but this virtual machine never shares a core with any other virtual machine. Note: if the virtual machine has any other number of vCPUs
These options have no effect on fairness or CPU time allocation. Regardless of a virtual machine’s hyper-threading setting it still receives the appropriate CPU time relative to CPU share and any CPU reservations or limits are honored. This setting can be adjusted regardless of the power state of the virtual machine.
Selecting the None option in effect disables hyper threading for your virtual machine.
Right click the virtual machine > Properties
Click the Resources tab
Click Advanced CPU
Under Hyperthreaded Core Sharing, use the drop down to select None
Here are some screen shots that will guide you through the process.