Hyper-V provides a very robust and powerful virtualization solution that runs production workloads in many enterprise data centers today. As with any virtualization solution, there are certainly performance considerations and tuning that can be done to enhance the performance of the hypervisor as well as the virtual machine workloads running within the environment.

The key areas of any hypervisor solution when dealing with tweaking performance includes the hypervisor host itself, CPUs, memory, storage, and networking. Each of these core areas is critical to making sure production workloads perform as expected and each can potentially become a bottleneck to solid production performance.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

Now, let us see,

  • How can you go about performance tuning Microsoft Hyper-V?
  • What are key adjustments that can potentially be made or tweaks that can be implemented to ensure solid performance?

Performance Tuning Microsoft Hyper-V

Tweaking Hyper-V consists of looking at each of the core components of the Hyper-V virtualization environment and making sure each are configured in accord with best practices as outlined by Microsoft. Additionally, there are other performance tweaks that can be considered and implemented. As mentioned, the critical areas for Hyper-V performance include:

  • Hyper-V host and hypervisor tuning/configuration
  • CPUs (Processor), Guest OS, and virtual processor considerations
  • Memory
  • Storage
  • Networking

Let’s take a look at each of these individually and performance tweaks that can be implemented at each of these levels that can benefit production workload performance.

Download Banner

Hyper-V Hypervisor Performance Considerations

It goes without saying that the Hyper-V hypervisor host will benefit from hardware that is designed to handle the often-increased workloads that are related to a hypervisor host. Configuring the Hyper-V host with more powerful hardware for handling the Hyper-V workloads will definitely benefit overall performance. When thinking about the hypervisor hardware, consider the following recommendations from Microsoft for hardware that is able to handle the overall virtualization workloads:

Processors

Make sure the processors that are configured with the Hyper-V host support Second Level Address Translation (SLAT) and Extended Page Tables (EPT), additionally Nested Page Tables (NPT)

Cache

Make sure processors have a healthy configuration of cache. This benefits not only workloads that have a large working set in memory but also production workloads that have a large number of virtual processors

Memory

Root and child memory partition configurations are important with Hyper-V. The root partition is what handles I/Os on behalf of VMs and other operations like checkpoint creation. Child partitions should be sized based on loads of the running virtual machines

Storage

Make sure storage hardware has enough storage bandwidth to service both current workloads as well as potential future workloads on the host. This includes making sure RAID controllers and disks are spec’ed out properly to handle the workload demands.

Power Plan Considerations

A consideration to be made for performance is that Windows Server by default uses the Balanced power plan for enabling the best mix between power conservation and performance. This is known as Demand Based Switching.

However, when using the balance power plan, the highest processor performance is only applied when the host is busy. To ensure the best performance to Hyper-V workloads at all times, the High-Performance power plan should be enabled as this allows the processors to run at full speed at all times. This effectively disables the Demand Based Switching mechanism.

Perform a Server Core Installation

The Server Core installation with Windows Server 2016 provides an extremely small footprint for hosting server roles such as Hyper-V. It does not contain a GUI for interacting with Windows Server but rather can be administered using Windows PowerShell and various MMC management consoles from another management workstation or server.

This provides several benefits to Hyper-V such as a much smaller OS footprint and a smaller attack surface for security as well as a smaller surface for installing Windows updates.

CPUs (Processor), Guest OS, and virtual processor considerations

In virtualized environments, processing power and performance is extremely important. Often sizing processors and configuring the layout of processors in the context of virtual machines is a different animal from sizing processors and configuring for a physical host. Additionally, making sure guest operating systems are configured for and have the integration services allowing them to operate at peak performance within Hyper-V is a definite consideration.

Virtual Machine Integration Services

For those familiar with VMware Tools, Hyper-V has something similar called Hyper-V Integration Services. Integration Services are the services that contain drivers for Hyper-V specific I/O devices which reduces CPU overhead and improves the overall I/O throughput of the virtual machine.

Make sure to verify the Hyper-V supported guest operating systems here: https://technet.microsoft.com/library/hh831531.aspx

Virtual Processor Configuration and vNUMA

Windows Server 2016 supports as many as 240 virtual processors per virtual machine.

Does this mean you should configure these many virtual processors for all your virtual machines? No.

Adding unneeded virtual processors adds additional overhead to the virtual machine if it doesn’t actually need the additional processors. A good rule of thumb is to start out with (1) virtual processor. Increase the number of processors only if the virtual machines requires more than the (1) CPU under peak load.

Pay attention to NUMA boundaries. Windows Server 2016 Hyper-V allows presenting virtual NUMA topology to VMs so that the virtual machines topology is optimized to match the NUMA topology of the underlying Hyper-V host. However, it is wise to take note of the NUMA boundaries and the physical CPU layout in the Hyper-V host. Prior to Windows Server 2016, this vNUMA technology was not implemented. This could lead to bad performance due to the lack of NUMA optimizations.

Hyper-V Memory

Much as you would when sizing the virtual processors for a virtual machine workload, virtual machine memory must be configured appropriately. This includes sizing the virtual machine for not only the normal loads but also loads experienced during peak times. Hyper-V offers dynamic memory. With dynamic memory, Hyper-V can reclaim memory from virtual machines that are not using it resulting in much higher consolidation rates for servers running on Hyper-V hosts. Hyper-V in Windows Server 2016 monitors the runtime health of the root partition’s management operating system to determine how much memory can safely be allocated to child partitions. This ensures the root partitions still maintains high performance and reliability.

Hyper-V Storage Considerations for Performance

There are many considerations to be made from a Hyper-V storage perspective. These include the types of virtual controllers that are used in the virtual machines, VHD formats, as well as offloading for better storage performance. Considering the virtual storage controller types, the first is IDE.

IDE – Is an older format that is emulated for older operating systems that may not be able to run the Hyper-V integration services. IDE disks should also only be used for the operating system disks due to performance limitations related to the maximum I/O size that can be issued.

SCSI (SAS Controller) – This virtual controller type can support up to 64 devices and it is recommended to attach multiple disks to a single virtual SCSI controller and scale out with controllers as these are needed to connect additional disks. SCSI is not emulated like the IDE controller, so it is preferred for any disk other than the OS disk. In fact, with Generation 2 VMs, it is the only controller that is available.

Virtual Fiber Channel – This virtual controller can be used to allow access to Fiber Channel and Fiber Channel over Ethernet.

The Virtual Disk Format

Starting in Windows Server 2012 and newer, new VHDs that are created are created with 4 KB alignment. Keep in mind that simply moving a VHD from a previous Hyper-V release does not automatically convert the VHD to the new format. However, there is a command that can accomplish this task:

Convert-VHD –Path D:\vms\servervhd\server.vhd –DestinationPath E:\vms\servervhd\server-converted.vhd

VHDX Virtual Disk Format

When possible, use the new VHDX virtual disk format for performance. It includes the following performance benefits:

  • Improved alignment on large sector disks
  • Larger block sizes
  • 4 KB logical sector which is better for performance
  • More efficient data representation, smaller file sizes, and unmapping

If you are upgrading to Windows Server 2016 from a previous Hyper-V release, it is recommended due to the performance benefits, to convert VHD disks over to the VHDX format.

Use Offloaded Data Transfer

Utilizing storage that enables Offloaded Data Transfer, Windows Server Hyper-V will check the capabilities of the storage attached to Hyper-V, if hardware-assisted storage is available, copies and other operations such as merging checkpoints will bypass the software stack and make use of the hardware-assisted capabilities.

Hyper-V Networking Performance Tweaks

Windows Server 2016 provides many new performance enhancements to the Hyper-V networking stack. One of these is converged networking which provides a much more powerful and robust network configuration model for multiple networks. Many of these new features take advantage of SMB Direct as well as RDMA enabled network controllers. These provide offloading capabilities that bypass any unnecessary path along the way for data to be transferred. There are other offloading capabilities to be aware of including:

  • Receive Side Scaling
    • Offloads network requests across all available CPU cores
  • Dynamic Virtual Machine Queue (virtual receive side scaling)
    • Allows using RSS inside virtual machines

Takeaways

There are many great performance considerations that can and need to be made with Microsoft Windows Server Hyper-V. Hyper-V is already an extremely powerful hypervisor “out of the box”, however, with the additional performance considerations and design, administrators can squeeze quite a bit more performance out of their Hyper-V environments. We have looked at several potential areas for performance tweaks including the Hyper-V hypervisor itself along with virtual machine configuration, CPU, memory, storage, and networking. By considering the above performance recommendations and others in each of the core areas of the Hyper-V environment, administrators can ensure there are no performance bottlenecks in any of the areas mentioned. With a well-designed and thought out Hyper-V environment along with performance considerations along the way, the Hyper-V environment will be able to perform extremely well-carrying production workloads as well as allowing for future growth.

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

5/5 - (1 vote)