Give Me the Whole Core and Nothing but the Whole Core

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:

  1. 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
  2. None – The vCPUs of this virtual machine have exclusive use of a processor whenever they are scheduled to the core.
  3. 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.

Step-by-Step:
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.

blog1

blog2

blog3

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

  • http://kendrickcoleman.com Kendrick Coleman

    Nice post Jeff. Always good to understand more about the advanced features within vSphere and how they can relate to specific applications

  • Wwy94621

    One question, if my ESXi's Hyperthreading is inactive, do I need to change the setting to None?

    • Jeff Szastak

      If hyper-threading is disabled at the BIOS level of your ESXi host then you do not need to change the default setting.

    • http://twitter.com/szastak Jeff Szastak

      If hyper-threading is disabled at the BIOS level of your ESXi host then you do not need to change the default setting.

  • Mack

    ESXi hypertheading is enabled, VM hyperthread sharing is any, but my windows guest still says that hypertheading is not available. I want Windows to do the hyperthreading not ESXi. Is there anything I can do to let Windows do the hypertheading? The reason for this is when vmware hypertheads the core it is presenting the core as an independent core and I have to license it for my software package…..when windows does the hyperthreading the software package doesn’t count the hyperthreaded core.