kantver - Fotolia

How can I optimize Hyper-V live migrations?

When we perform a Hyper-V live migration, it bogs down our system. How can we reduce the size of the migration and optimize data transfer performance?

Hyper-V requires careful configuration to optimize its behavior for specific data center environments. Windows...

Server 2012 and Windows Server 2012 R2 allow administrators to select performance options that can optimize Hyper-V live migrations. Those options can be configured in the Hyper-V Manager console or through the Set-VMHost cmdlet in PowerShell.

By default, Hyper-V in Windows Server 2012 R2 uses the compression option for live migrations. This option first compresses the memory space a VM uses and then copies that content to the destination system. Compression reduces the total size of the migration, lowering the total number of packets being exchanged across the network, but compression requires more processor power on each server to compress and then decompress content. Additional buffer space is also required in-memory to retain compressed content. Consequently, compression may not be the ideal performance option for migrations from high-processor and memory utilization systems.

If compression isn't a desirable migration option, administrators can select an uncompressed TCP/IP transfer mode where the memory space of the VM is copied directly to the target system. Because VM space is uncompressed, the transfer can require many more packets to complete. This can be a disadvantage for busy network segments, such as crowded servers sharing file and storage traffic. But eliminating compression and decompression can save processing and memory resources.

Hyper-V live migrations also use the server message block (SMB) 3.0 protocol, which allows memory content of the original VM to be copied directly to a destination server using SMB techniques. For example, if network interface controllers on both ends of the migration support remote direct memory access, SMB Direct can move VM content directly from one server's memory to the other without having to first move packets up and down the traditional network stack. This can improve performance on busy networks while still lowering processor and memory overhead used for network traffic handling. In addition, if SMB detects a valid multichannel network setup, multiple simultaneous network channels can improve migration performance.

With the exception of certain SMB options like SMB Direct or SMB Multichannel, Hyper-V live migration performance options apply to migrations initiated on that host system. Performance options are typically send-only and there is no explicit requirement to match performance options on any destination systems. So it's possible to move VMs between two systems using differing performance options.

Performance options collectively work to reduce overhead on the network and the computing resources involved in the migration -- reducing the time required to compete a migration and associated tasks. However, these performance options are subtle, and the biggest benefits will appear in large, active environments; average everyday business deployments with minimal VM migration needs may not see noticeable differences in live migration performance options. Obtain a benchmark or average migration time first then run another benchmark to obtain an objective measure of performance differences over time.

Next Steps

The best way to authenticate live migrations with Hyper-V

Look under the hood during a Hyper-V live migration

How to troubleshoot Hyper-V storage and networking configurations

Dig Deeper on Microsoft Hyper-V management