Monday, 26 November 2012

Hyper-V in a Multi-Core Hyper-Threaded World

Here are some points on how we configure our physical Hyper-V hosts:

  • Hyper-Threading is disabled.
    • Logical “cores” will not help with performance where the CPU will still need to juggle between physical and virtual cores (the Hyper-Thread).
  • TurboBoost is disabled.
  • SpeedStep and Wait States are disabled.
    • See Hyper-Threading.
  • Cooling Profile: Set to Maximum Performance
    • We may pay a few pennies more for not bringing things down with all of these settings but our priority is the stability of our systems plus their instantly available performance characteristics.

Now, for the virtual machines we need to keep the following in mind as far as a rule of thumb in our SMB/SME space:

  • Number of Physical Cores on one CPU = Maximum Number of vCPUs.
  • Amount of RAM on one CPU –1GB = Maximum RAM assigned to 1 VM.

Physical Cores

Some perspective:

  • A vCPU = a Thread to the physical CPU.
  • Multiple vCPUs = multiple threads to the physical CPU.
  • All Hyper-V vCPU threads must be processed simultaneously by the CPU physical Cores.
    • Therefore: Performance is impacted if more vCPUs/Threads are assigned to 1 VM than physical cores are available on 1 physical CPU.

System Memory

This subject is a bit more tricky since the information that we can gather on NUMA spanning is quite limited in scope. From what we can tell, the number of NUMA Nodes depends on the number of memory controllers in the system or on the CPU.

  • Rule of Thumb: Assign RAM associated with 1 physical CPU – 1GB to VM.
    • If there is more than 1 NUMA node per CPU then factor in RAM assignments accordingly.

Performance Configurations

Given the above we can surmise that:

  1. A VM will perform at its best if the number of vCPUs assigned to it equals or is less than the number of physical cores on one CPU.
    • And:
  2. A VM will perform at its best if the amount of RAM assigned to it is equal to or less than the amount managed by one NUMA node.


Any time the physical server needs to juggle threads across CPUs or fetch memory content from other NUMA Nodes or RAM managed by another CPU’s memory we run into performance hits.

Philip Elder
Microsoft Small Business Specialists
Co-Author: SBS 2008 Blueprint Book

Windows Live Writer

1 comment:

IL said...

Thank you in the 1st place. By 1st glance (without checking) recommendations are similar to SQL Server hardware settings in physical environment. Would you please tell me if there are any tests which back the conclusion to switch off Hyper-Threading, speed steps and wait states for Hyper-V is good? That's just a doubt. There are also AMD Piledriver processors, which AFAIR have 2 physical cores sharing one FPU. Does it amend your assumption of 1 vCPU = 1 pCore?
Best regards,