Performance Tuning for Hyper-V Servers

The Performance Tuning Guidelines for Windows Server 2008 has been updated to include perf guidelines for virtualization servers as well as:

  • Performance Tuning for Server Hardware
  • Performance Tuning for Networking Subsystem
  • Performance Tuning for Storage Subsystem
  • Performance Tuning for Web Servers
  • Performance Tuning for File Servers
  • Performance Tuning for Active Directory Servers
  • Performance Tuning for Terminal Server
  • Performance Tuning for Terminal Server Gateway
  • Performance Tuning for Virtualization Servers
  • Performance Tuning for File Server Workload (NetBench)
  • Performance Tuning for Network Workload (NTttcp)
  • Performance Tuning for Terminal Server Knowledge Worker Workload
  • Performance Tuning for SAP Sales and Distribution Two-Tier Workload

Advice in the paper includes:

  • For better performance, use all logical processors (up to 16) if the number of active virtual processors matches that of logical processors to help reduce the rate of context switching between virtual processors.
  • Set your processor cache as high as possible for loads that have a large working set in memory and in VM configurations in which the ratio of virtual processors to logical processors is high.
  • More memory is better, usually (no surprise). The "virtualization host" server requires sufficient memory for the root and child partitions. Hyper-V first allocates the memory for child partitions, which should be sized based on the needs of the expected server load for each VM. The root partition should have sufficient available memory to efficiently perform I/Os on behalf of the VMs and operations such as a VM snapshot. YMV, so use the planning toolkits and pilot testing to find your optimum setting.
  • Multiple network adapters or multiport network adapters are a good idea, both for network-intensive VM workloads, and management. VMs can be distributed among the adapters for better overall performance. To reduce the CPU usage of network I/Os from VMs, Hyper-V can use hardware offloads such as Large Send Offload (LSOv1) and TCPv4 checksum offload. For details on network hardware considerations, see “Performance Tuning for Networking Subsystem” earlier in the Performance Tuning Guidelines for Windows Server 2008 guide.
  • Ensure your storage hardware has I/O bandwidth and capacity to meet current and future needs of the VMs. Consider Placing VMs with highly disk-intensive workloads on different physical disks will likely improve overall performance. For example, if four VMs share a single disk and actively use it, each VM can yield only 25 percent of the bandwidth of that disk. For details on storage hardware considerations and discussion on sizing and RAID selection, see “Performance Tuning for Storage Subsystem” earlier in the Performance Tuning Guidelines for Windows Server 2008 guide.

For some insight into how Microsoft IT uses virtualization (they use SANs for disk storage) listen to the David Lef podcast on How Microsoft IT Uses Hyper-V.

Additional tips:

CPU Statistics

Hyper-V publishes performance counters to help characterize the behavior of the virtualization server and break out the resource usage. The standard set of tools for viewing performance counters in Windows include Performance Monitor (perfmon.exe) and logman.exe, which can display and log the Hyper-V performance counters. The names of the relevant counter objects are prefixed with “Hyper-V.”

You should always measure the CPU usage of the physical system through the Hyper-V Hypervisor Logical Processor performance counters. The statistics that Task Manager and Performance Monitor report in the root and child partitions do not fully capture the CPU usage.