Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files in Windows Server 2008 R2

With the release of Windows Server 2008 R2, one of the enhancements was improving the performance of dynamic VHD files. Prior to R2, writes to dynamically expanding VHD files could be 3x slower than writes to a fixed size VHD file due to limited meta data caching. Overall, Microsoft is claiming the performance of dynamic VHD files vs. fixed size VHD files is almost identical.

Pass-through disks are another option when configuring a Hyper-V VM. According to my results, the performance of a pass-through disk is marginally better than that of VHD files. However, if you use pass-through disks you lose all of the benefits of VHD files such as portability, snap-shotting and thin provisioning. Considering these trade-offs, using pass-through disks should really only be considered if you require a disk that is greater than 2 TB in size or if your application is I/O bound and you really could benefit from another .1 ms shaved off your average response time.

I figured rather than taking Microsoft’s word for it, I would put these different disk types to the test for myself. I set up a Hyper-V Windows Server 2008 R2 virtual machine running on top of Windows Server 2008 R2. For my Hypervisor, I used Dell PowerEdge 1950 server attached to a Dell AX150 SAN and carved off three 10 GB LUNs for use in my test. In Hyper-V Manager, I added three new disks, one pass-through, one dynamic VHD and one fixed-size VHD. I then used IOMeter to test the performance of the disks. The test parameters and raw data can be found in this CSV file.

The charts below summarize my results. As you can see, on the extremes (Maximum/Minimum), the pass-through disk wins in most cases. However, on average, there is almost no difference between the performances of the three different disk types.

 

 

The benefit of thin provisioning, meaning building a VHD file or multiple VHD files with a combined size that is greater than the available disk space, and the portability of VHD files make dynamically expanding VHD files the obvious choice for most Windows Server 2008 R2 virtual machines.

In summary, I’d strongly consider the use of dynamically expanding VHD files for your next Hyper-V deployment on Windows Server 2008 R2.

Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files in Windows Server 2008 R2

19 thoughts on “Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files in Windows Server 2008 R2

  1. Miha Pecnik says:

    Would it be possible for you to perform these same steps on a non R2 Windows 2008 machine so we’d see by how much they’ve really improved it in R2?

  2. Ryan says:

    I’m getting much slower boot time (2x-3x or more) after exporting a VM (and converting the fixed disks to dynamic) from a Hyper-V r1 host to an R2 host. I haven’t had a chance yet to test the same VMs if I kept them as fixed disks. Have you also seen this behavior? I haven’t had a chance to test performance after boot, though….

    1. daveberm says:

      I have not done any comparisons of R1 and R2 and have not tested booting from fixed vs. dynamic disks. I always boot from dynamic disks in my lab and have not noticed any apparent delay. Let us know if performance improves for you.

  3. Scott says:

    I’m new to IOMeter, Is there something that needs to be done on the Windows 2008 R2 server to see the iSCSI Disks?

    I can see all of them on the Windows 2003 servers, just not the 2008 R2 servers. Local and network drives show up fine.

    Thanks,

  4. Joe says:

    Problem with dynamic disks.

    If you have more than one dynamic disk per partition then you will run into fragmentation issues when they automatically expand and take up the next space on the disk. you will have something like;

    hard disk : |VM1 —– |VM2 —-| VM1part2|VM2part2—–|VM1part3| and so on….so the read performance will suffer greatly.
    espically if both virtual disks are being accessed simultaneously

    I’d use Fixed size VHDs and where possible keep them to their own physical disk volumes.

  5. […] EDIT: looked it up, still slower but they fixed much of the horror in 2k8R2 for dynamic speed Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files in Windows Serv… Still static is better practice, I would at the least have a nice big place holder file or two […]

    1. daveberm says:

      Yes, I agree you should pre-allocate the size if possible. I have observed pretty substantial i/o performance degradation during the period where a VHD file is being “expanded”, so to avoid any interruption to i/o you should pre-allocate the VHD file.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s