Today I thought of measuring the differences between fixed and dynamic VHD and VHDX. We read a lot about such but I want to replace faster or slower with figures. Of course the figures will vary from one setup to another, but still I want some indicative figures.
I have already has the following setup up and running
One Core i7 PC with 32GB RAM and Intel 520 series SSD with Windows Server 2012 as base OS with the iSCSI Target Server role and VMware Workstation 9.0 installed. In VMware I have 2 VM’s each allocated 7GB RAM and running Windows Server 2012 with the Hyper-V role enabled. These 2 VM’s are forming a cluster and presented an iSCSI CSV from the physical Windows Server 2012. In other words, a small cluster on the same PC.
What is important is that I have a Hyper-V 3 cluster using a CSV which CSV is on an Intel 520 series SSD. In this cluster I have a Windows Server 2012 VM, which is the actual AD for hte cluster. This VM has the following drives (which are all on the CSV)
- C: – Boot / OS
- D: – DVD – An ISO file of around 3.44GB
- E: – Test drive – 25GB Fixed VHD
- F: – Test drive – 25GB Fixed VHDX
- G: – Test drive – 25GB Dynamic VHD
- H: – Test drive – 25GB Dynamic VHDX
I did 3 tests on each of the 4 test drives, which are
- DVD to Disk – Creation. Copy the DVD contents to a folder 1 on each test disk
- Disk to Disk – Creation. Copy the contents of folder 1 to folder 2 on the same drive
- Disk to Disk – Overwriting. Deleted the contents of folder 2 and then re-run test B
This is not high-performance gear and it’s noting close to production systems, however the idea here is to have the same setup for dynamic and fixed VHD and VHDX to see the performance difference. Because I’m using VMware, then the virtual nic over which the CSV is presented is 1GBe. I’m not a VMware expert and I wonder if it can be 10GBe like the Hyper-V
The results
Drive
|
Type
|
DVD to Disk Creation
|
Disk to Disk Creation
|
Disk to Disk Overwriting
|
E:
|
Fixed VHD
|
12.96MB/s
|
34.65MB/s
|
34.22MB/s
|
F:
|
Fixed VHDX
|
12.93MB/s
|
35.39MB/s
|
34.62MB/s
|
G:
|
Dynamic VHD
|
11.28MB/s
|
25.05MB/s
|
37.12MB/s
|
H:
|
Dynamic VHDX
|
12.23MB/s
|
33.56MB/s
|
35.36MB/s
|
My interpretation
If the difference in performance is very small, then it could be in the margin of error of the tests. The tests were run only once each, due to time constrain.
- DVD to Disk – Creation
- Fixed VHDX is negligible slower then fixed VHD. This could be in the tests margin of error
- Dynamic VHD performance penalty from Fixed VHD is 15%
- Dynamic VHDX performance penalty from Fixed VHDX is 6%
- Disk to Disk – Creation
- Fixed VHDX is around 3% faster than fixed VHD
- Dynamic VHD performance penalty from Fixed VHD is a whopping 38%
- Dynamic VHDX performance penalty from Fixed VHDX is 5%
- Disk to Disk – Overwriting
- Fixed VHDX is marginally faster than fixed VHD
- Dynamic VHD is actually 8% faster than Fixed VHD*
- Dynamic VHDX is actually 2% faster than Fixed VHDX*
The SandForce Factor
One of the reasons why dynamic are slower than fixed is that dynamic disks needs to expand. This process is a performance penalty but it’s hugely improved in VHDX where it goes down from 38% to 6%. However the Disk to Disk – Overwriting test shows that the dynamic are actually faster than the fixed. In my opinion the reason is the underlying SSD. I am using the Intel 520 series which use the SandForce controller. SandForce controllers actually compress the data before writing it to the flash cells. So, when creating the fixed VHD(x), where these are zero filled, in reality little was written to the flash cells. So when running the Disk to Disk – Creation test, actually a lot of flash cells were being allocated for the new data. In the Disk to Disk – Overwriting, the SandForce controller is now replacing the data, with almost identical data. This could account for the behavior marked with * in the results table
Further Tests
While it would be interested to make the same tests on Hyper-V 2 (without the VHDX), then I could be that it’s not worth the hassle. On the other hand, it would be interesting to make the same test on mechanical HDD to eliminate the SandForce controller variable. Perhaps when I find some time, I’ll do just that.