You may have heard that in Hyper-V, dynamically expanding disks are slower than fixed size disks, but do you know what causes it? This article will explain it for you.
Hyper-V is a popular type 1 hypervisor. When creating VMs with it, you need to choose what types of virtual hard disk (VHD) to create.
Basically, there are 3 different types of Hyper-V virtual hard disks you can create.
They have different advantages, for example, dynamically expanding disks are slower than fixed size disks, and thus they are suitable for different situations.
In this article, I will introduce the pros and cons of these 3 types of Hyper-V virtual hard disk, and make a comparison between them.
A fixed size disk only takes up the space you allocated to it during VM creation.
For example, if you create a 120 GB fixed size disk, it will actually take up 120 GB of your physical storage, regardless of how much data you stored in it.
Disk fragmentation does not easily occur on fixed size disks. Because if you deleted a file on it, it will be marked as write-over so that the newly created file can be stored over it.
✦ Advantages:
✦ Disadvantages:
✍If you can't accept the disadvantages of the fixed size disk, you can convert the fixed disk to a dynamic disk.
Dynamically expanding disk is a disk type that is small at creation, but grows as more data is written to the VM.
For example, if you create a 120 GB dynamically expanding disk, it may only take up 40 GB your VM needs at creation, but it will grow as the data written to it afterwards.
Although space-saving, dynamically expanding virtual disks are prone to fragmentation and image read speeds. Look at these Hyper-V dynamic memory pros and cons.
✦ Advantages:
✦ Disadvantages:
Differencing disk is also called child disk, refers to the dynamic volume that’s chained to a parent disk. It only stores the changes made to the parent disk.
Differencing disk is small at creation, and grows as the changed data written to it. If its parent disk is an incompletely expanded dynamically expanding disk, the differencing disk may even grow larger than the parent disk.
✦ Advantages:
✦ Disadvantages:
Now you've known what the dynamically expanding disk and fixed size disk are and their pros and cons. In this part, I will summarize what is the difference between a fixed size virtual disk and a dynamically expanding virtual disk.
Dynamically expanding virtual hard disk vs fixed size virtual disk
Disk type | Fixed size disk | Dynamically expanding disk |
Total disk size | fixed | grow as data written |
Size at creation | larger | smaller |
Space saving | no | yes |
Creation time | longer | shorter |
Disk fragmentation | no | yes |
Read rates | higher | lower |
Performance | better | worse |
Dynamically expanding disks will cause disk fragmentation and require additional processing of disk read and write accesses, resulting in much slower servers. Here is what exactly happens:
In a fixed size disk, all blocks are located at a known location which is linearly addressed, and each block is equally quick accessible if neglecting seek time differences. However, seek times are a fundamental variable when blocks are written many thousands of times per second.
In a dynamically expanding disk, logically sequential blocks are not necessarily close to each other. The two blocks that are supposed to be next to each other on the disk may in fact be at opposite ends on the physical disk, and require a substantial disk head move. There is also additional CPU and RAM required to index all blocks if you used SSD which has negligible seek times.
This additional management requirement may be fine for one or two VMs, but if you have dozens on a busy server, the resources required to handle disk access all add up, as well as the time and performance.
As you can see, each disk type has its own advantages and you are advised to choose according to your situation.
Whichever disk type you choose, once you've created a VM, the next thing you need to do is to set up a regular backup schedule to protect the critical VM data. Here I recommend AOMEI Cyber Backup, a free backup solution that can back up multiple VMs regularly with simple steps. More »
Why dynamically expanding disks are slower than fixed-size disks, and what's the difference between them? This article introduced the basic information you should know, and help you to make the choice. If you have adequate storage space and you value the VM performance, making fixed-size disks is a better option.