Written by 4:44 pm Microsoft, Virtualization, Windows Server • 10 Comments

Windows Server 2012 Hyper-V: Virtual Disk VHD & VHDX recommendations

Windows Server 2012 Logo

In the new released Performance Tuning Guidelines for Windows Server 2012 you can find a lot of tuning information for Windows Server 2012 Hyper-V. One important part is the Virtual Disk chapter which is all about the VHD and the new VHDX format.

The basic key takeaways are:

  • Use VHDX every time
  • Use Dynamic VHDX

The VHDX format:

VHDX is a new virtual hard disk format introduced in Windows Server 2012, which allows you to create resilient high-performance virtual disks up to 64 terabytes. Benefits of this format include:

  • Support for virtual hard disk storage capacity of up to 64 terabytes.
  • Protection against data corruption during power failures by logging updates to the VHDX metadata structures.
  • Ability to store custom metadata about a file, which a user might want to record, such as operating system version or patches applied.

The VHDX format also provides the following performance benefits (each of these is detailed later in this guide):

  • Improved alignment of the virtual hard disk format to work well on large sector disks.
  • Larger block sizes for dynamic and differential disks, which allows these disks to attune to the needs of the workload.
  • 4 KB logical sector virtual disk that allows for increased performance when used by applications and workloads that are designed for 4 KB sectors.
  • Efficiency in representing data, which results in smaller file size and allows the underlying physical storage device to reclaim unused space. (Trim requires trim-compatible hardware.)

When you upgrade to Windows Server 2012, we recommend that you convert all VHD files to the VHDX format due to these benefits. The only scenario where it would make sense to keep the files in the VHD format is when a virtual machine has the potential to be moved to a previous release of the Windows Server operating system that supports Hyper-V.

VHD File Type

The following recommendations should be taken into consideration with regards to selecting a VHD file type:

  • When using the VHD format, we recommend that you use the fixed type because it has better resiliency and performance characteristics compared to the other VHD file types.
  • When using the VHDX format, we recommend that you use the dynamic type because it offers resiliency guarantees in addition to space savings that are associated with allocating space only when there is a need to do so.
  • The fixed type is also recommended, irrespective of the format, when the storage on the hosting volume is not actively monitored to ensure that sufficient disk space is present when expanding the VHD file at run time.
  • Snapshots of a virtual machine create a differencing VHD to store Writes to the disks. Having only a few snapshots can elevate the CPU usage of storage I/Os, but might not noticeably affect performance except in highly I/O-intensive server workloads. However, having a large chain of snapshots can noticeably affect performance because reading from the VHD can require checking for the requested blocks in many differencing VHDs. Keeping snapshot chains short is important for maintaining good disk I/O performance.

For more information checkout the Performance Tuning Guidelines for Windows Server 2012.

And check out my other post about VHD and VHDX for Hyper-V:

Update 1:

My Virtual Machine MVP colleague Carsten Rachfahl just told me that now also IDE devices can use the TRIM function for VHDX files. That means that VHDX on SCSI or IDE controller as well as pass-through disks support TRIM. The only thing which is required is trim-compatible hardware.

Update 2:

Even the GUI in Windows Server 2012 and Windows 8 recommend Fixed size for VHDs and Dynamic expanding for VHDX.

I have now server customer environment running in products for a couple of months and all are using the new Dynamic Expanding VHDX format. No problems and performance issues at all. Dynamic Expanding VHDX disks are even running faster than Fixed Size VHD files.

 

Tags: , , , , , , , , , , , Last modified: February 13, 2013
Close Search Window
Close