Clustering For Mere Mortals

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

Posted in Hyper-V, virtualization by daveberm on September 25, 2009

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.

18 Responses

Subscribe to comments with RSS.

  1. [...] it there Filed Under: Virtualization, Windows 2008 R2, Hyper-V, Tips & [...]

  2. Miha Pecnik said, on November 27, 2009 at 5:24 pm

    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?

    • daveberm said, on November 29, 2009 at 4:12 am

      Great idea. I’ll add it to my list of blog ideas and try to get to it soon. Thanks!

  3. Ryan said, on December 5, 2009 at 12:08 am

    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….

    • daveberm said, on December 5, 2009 at 12:27 am

      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.

  4. daveberm said, on March 20, 2010 at 1:20 am

    Microsoft has gone and published their own report. Have a look at it here…

    http://download.microsoft.com/download/0/7/7/0778C0BB-5281-4390-92CD-EC138A18F2F9/WS08_R2_VHD_Performance_WhitePaper.docx

  5. Scott said, on November 8, 2010 at 3:19 pm

    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,

    • daveberm said, on November 10, 2010 at 12:13 am

      Sorry, not sure what the problem might be. Do you have a NIC dedicated for iSCSI?

  6. James said, on December 14, 2010 at 2:50 am

    Subscribe

  7. [...] Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files in Windows Serv… September 200910 comments 4 [...]

  8. Joe said, on August 4, 2011 at 8:42 am

    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.

  9. Dario said, on September 5, 2011 at 11:01 pm

    Thanks this was exactly what I was looking for. No pass thru disks needed it seems.

  10. [...] Strike that, less than a few percent performance loss on some areas and gains in others: Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files in Windows Serv… Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files in Windows [...]

  11. [...] 10. Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files in Windows Serv… [...]

  12. […] Hyper-V pass-through disk performance vs. fixed size VHD files and dynamic VHD files – while this is an article based on Hyper-V Running in Server 2008 R2 it is applicable to Hyper-V running on Server 2012 and Server 2012 R2. […]

  13. Basic or Dynamic disks said, on February 24, 2014 at 11:54 am

    […] 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 […]

    • daveberm said, on February 24, 2014 at 2:40 pm

      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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 914 other followers

%d bloggers like this: