Hyper-Threading and Virtualization
INFORMATION TECHNOLOGY 2008/04/17 18:12 -
There are many articles, documents and discussions in Internet and there is no definitive answer about the hyper-threading usage in virtualized environment.
A processor architecture feature that allows a single processor to execute multiple independent threads simultaneously. Hyper-threading was added to Intel's Xeon and Pentium® 4 processors. Intel uses the term “package” to refer to the entire chip, and “logical processor” to refer to each hardware thread. Also called symmetric multithreading (SMT).
To me the following HP document gives most complete description and recomendations to help taking the best decision for each particular case.
Hyper-threading settings recommended for optimal performance:
• Enabled – for systems running Windows Server 2008 R2 or Windows Server 2008 R2 SP1, if the application supports more than 64 processors, and if the application benefits from the additional logical processors
• Disabled – for systems running Windows 2008 SP2, or Windows Server 2008 R2 Hyper-V, when there are more than 64 logical processors
Performance testing may indicate a zero performance gain when enabling hyper-threading, and in some cases, even degraded performance. HP always recommends that you test your workloads with hyper-threading both ON and OFF. Whether or not the workload or custom application supports more than 64 processors, it is always good practice to test and benchmark these configurations.
From the same document
Hyper-threading refers to Intel’s proprietary technology for increasing parallel computational power (processor multi-tasking) by allowing the OS to see and address each physical processor core as if it were 2 virtual processors. It also enables the OS and applications to share work between those 2 virtual processors whenever possible, thereby making use of resources that would otherwise sit idle.
Make sure hyper-threading is enabled in the BIOS for processors that support it.
- Hyper-threading technology (sometimes also called simultaneous multithreading, or SMT) allows a single physical processor core to behave like two logical processors, essentially allowing two independent threads to run simultaneously. Unlike having twice as many processor cores—that can roughly double performance—hyper-threading can provide anywhere from a slight to a significant increase in system performance by keeping the processor pipeline busier.
If the hardware and BIOS support hyper-threading, ESXi automatically makes use of it. For the best performance we recommend that you enable hyper-threading ...
- When ESXi is running on a system with hyper-threading enabled, it assigns adjacent CPU numbers to logical processors on the same core. Thus CPUs 0 and 1 are on the first core, CPUs 2 and 3 are on the second core, and so on.
ESXi systems manage processor time intelligently to guarantee that load is spread smoothly across all physical cores in the system. If there is no work for a logical processor it is put into a halted state that frees its execution resources and allows the virtual machine running on the other logical processor on the same core to use the full execution resources of the core.
Be careful when using CPU affinity on systems with hyper-threading. Because the two logical processors share most of the processor resources, pinning vCPUs, whether from different virtual machines or from a single SMP virtual machine, to both logical processors on one core (CPUs 0 and 1, for example) could cause poor performance.
- ESXi provides configuration parameters for controlling the scheduling of virtual machines on hyper-threaded systems (Edit virtual machine settings > Resources tab > Advanced CPU). When choosing hyper-threaded core sharing choices, the Any option (which is the default) is almost always preferred over None.
The None option indicates that when a vCPU from this virtual machine is assigned to a logical processor, no other vCPU, whether from the same virtual machine or from a different virtual machine, should be assigned to the other logical processor that resides on the same core. That is, each vCPU from this virtual machine should always get a whole core to itself and the other logical CPU on that core should be placed in the halted state. This option is like disabling hyper-threading for that one virtual machine.
For nearly all workloads, custom hyper-threading settings are not necessary...
And finally if not decided yet, note the followin from RemoteFX installation guide on HP servers
RemoteFX features require both Hyper-V and Hyper-threading enabled at the BIOS.