Set Hyperthreading Sharing Options for a Virtual Machine
Will configuring a VM template for a VMware View 4.5 environment with 1200 desktops, I was exploring the advanced CPU options of a VM. There I saw a option: hypertreaded core sharing
I’m not sure if my explanation below is correct so please correct me if you think I’m wrong!
As I did not know what this option does I looked it up in the vSphere Resource Management Guide:
You can specify how the virtual CPUs of a virtual machine can share physical cores on a hyperthreaded system.
Two virtual CPUs share a core if they are running on logical CPUs of the core at the same time. You can set
this for individual virtual machines.
So in other words, do you want to share a core between VMs or not.
This is only the case if you have a 2 vCPU VM running on a host with hyperthreating enabled.
You have the following options:
Any
The default for all virtual machines on a hyperthreaded system. The virtual CPUs of a virtual machine
with this setting can freely share cores with other virtual CPUs from this or any other virtual machine at
any time.None
Virtual CPUs of a virtual machine should not share cores with each other or with virtual CPUs from other
virtual machines. That is, each virtual CPU from this virtual machine should always get a whole core to
itself, with the other logical CPU on that core being placed into the halted state.Internal
This option is similar to none. Virtual CPUs from this virtual machine cannot share cores with virtual
CPUs from other virtual machines. They can share cores with the other virtual CPUs from the same virtual
machine.
You can select this option only for SMP virtual machines. If applied to a uniprocessor virtual machine,
the system changes this option to none.
So I was configuring a VM template for a 1200 VMware View deployment. My vSphere host had hyperthreading enabled. Al of my VMs have 1 vCPU so I used the option None. But what if you have 2 or more vCPU VMs and 1 vCPU VMs combined in the same cluster. In that case there is a high change that a 2 vCPU vm and a 1 vCPU VM share the same CPU core. I that case this will effect your performance.
You can work around this problem .
1. Seperate your 1 vCPU VMs and multiple vCPU VMs on different clusters so you won’t mix those VMs.
2. Only provide 1 vCPU VMs.
3. Set the option Hyperthreaded Core Sharing under the advanced settings of your VM to None.
About Michael
Michael Wilmsen is a experienced VMware Architect with more than 20 years in the IT industry. Main focus is VMware vSphere, Horizon View and Hyper Converged with a deep interest into performance and architecture.
Michael is VCDX 210 certified, has been rewarded with the vExpert title from 2011, Nutanix Tech Champion and a Nutanix Platform Professional.