VMware CPU Hyper Threading Scheduling Affinity

affinityhyperthreadingvirtual-machines

I have looked everyware and read a bunch of documentation on this but haven't found a direct answer so here it goes:

There is a setting in the "Resources" Tab in vCenter that lets you configure Hyper-threading Core Sharing. I have this set to "ANY".

My question is with Scheduling Affinity. What happens if I leave the text field blank where you would assign specific cores?

Does VMWare handle the hyper-threading across all logical cores or does this disable hyper-threading?

Note: the Scheduling Affinity Group Box says

hyperthreading status: active
available CPUs: ## (Logical CPUs)

Best Answer

The UI may be confusing here, but Hyperthreaded Core Sharing and the Scheduling Affinity are separate items.

  • Hyper threading Sharing is just finer control over the HT options.
  • The Scheduling Affinity dialog displays Hyperthreading status (which is controlled at the hardware BIOS level) and then allows you to specify taskset-style CPU affinity masks.

enter image description here

Hyperthreading Sharing

The options are:

Any – (default) The virtual CPUs of this virtual machine can freely share cores with other virtual CPUs of this or other virtual machines.

None – The virtual CPUs of this virtual machine have exclusive use of a processor core whenever they are scheduled to it. The other hyperthread of the core is “halted” while this virtual machine is using the core.

Internal – On a virtual machine with exactly two virtual processors, the two virtual processors are allowed to share one physical core (at the discretion of the ESXi scheduler), but this virtual machine never shares a core with any other virtual machine. If this virtual machine has any other number of processors than two, this setting is the same as the None setting.


In either case, I don't recommend changing any of these settings in 99% of use cases as you run the risk of performance problems or increased contention. The Scheduling Affinity box should be blank.

Is there a particular effect or situation you're trying to deal with?


I just checked the language of the Adobe ColdFusion license. For your use case, "CPU" means physical socket (which may be multi-core). The licenses are sold in 2-CPU quantities. So you need one license per dual-socket ESXi host.