So sánh fixed size hyper-v năm 2024

Hyper-V is a type-1 hypervisor virtualization platform from Microsoft. When you install Hyper-V on the server, the hypervisor is installed right above the hardware and below the operating system. There are two ways to install Hyper-V: one is to install it using Server Manager on a Windows Server as a server role, and the other way is using a separate product called Microsoft Hyper-V Server that runs over a bare metal environment. When you create a virtual machine using Hyper-V you have various options to choose virtual disk type.

After you install Hyper-V server role, Hyper-V Manager is used to creating, modify and manage virtual machines. When creating VM in Hyper-V manager, we will be prompted to choose the type of virtual hard disk [VHD] that you want to use. It is important to understand the types of VHD so you can plan the host resource usage as efficiently as possible.

There are three types of Hyper-V VHD and each has their own pros and cons. Below is the explanation:

1. Fixed Size

A fixed VHD volume is simply taking up the size of the host disk space based on the size you decide. For example, if you create a 127 GB fixed VHD, then it means 127 GB disk space of the host storage will be dedicated for this VHD only.

Pros:

  • Better prediction of host storage usage because the size is fixed, we don’t have to worry about overprovisioning resources
  • Easy to copy virtual disk files between machine
  • The fastest virtual disk types

Cons:

  • There’s no way to reduce a fixed disk capacity once it has been created
  • Higher potential of wasting storage capacity, if you make the VHD too large

2. Dynamically Expanding

Dynamic volume uses the concept of thin provisioning. When creating a dynamic VHD volume, you still must specify the size, but the host disk space usage is based on the how much data is being stored on that VHD volume. For example, if you created 127 GB VHD but the virtual machine only used 40 GB on, then it means the disk space consumed on the host’s physical storage will also be 40 GB and will not consume full 127GB storage.

Pros:

  • Better storage efficiency because unallocated space can be used by another VM
  • Still easy to copy virtual disk files between machine

Cons:

  • Requires careful planning and periodic monitoring to avoid overprovisioning storage on the host
  • Slight hit on the performance compared to fixed VHD

3. Differencing

A differencing disk is a dynamic disk that is chained to a parent disk. This is called child disk. A child disk stores the changed/modified data of the parent disk, so basically, we will have several identical virtual machines but in a different state. Using a child disk on a VM will help keeping the consistency of the base image, but adding more complexity when relocating parent disk as all the child disks must revalidate the chain.

Pros:

  • Provide efficient storage usage with good performance
  • Ability to isolate changes on the parent disk, very useful for troubleshooting, analysis, etc.

Cons:

  • Possibility to overprovisioning host storage
  • No way to reduce the virtual disk capacity
  • Adding complexity when relocating parent disk

When it comes to virtualization and virtual machines, choosing the right disk type is very important before you can set up and run the virtual machine. And having a proper backup strategy to back up virtual machines, and even Hyper-V host is critical in production environments.

You can backup Hyper-V virtual machine at the guest level or host level. Backing up on guest level captures the content of the VHD but it ignores the external VM components such as checkpoint and hardware allocation, and it can only be restored to another VM.

On the other hand, backup at the host level has two methods: one is using Saved State method where VM is put into a “saved state” prior making a backup and then restored back after it done; the other one is to backup the child VM so there is no service interruption during the backup process. Iperius Backup software is built to backup Hyper-V virtual machines and virtual disks so that you can easily restore the fully functional virtual machine from backup.

This article outlines some considerations when using fixed disks for Hyper-V and fixed disk Hyper-V backup.

Performance of Fixed Disks at Run-time

Fixed-sized VHDX are great building blocks for VMs as they greatly reduce overhead in Hyper-V. Assuming you refrain from using Hyper-V checkpoints, disk access to fixed disks is always linear. In addition, neighboring blocks of data are indeed stored next to one another, which isn’t the case when using dynamic disks. Since it’s very likely a service inside the VM will access neighboring blocks together, each read and write access are now faster because Windows does not have to move hard drive disk heads around. Seek time is a very big performance penalty and, by the way, the main reason why disk fragmentation has such a strong, negative effect on server performance.

In fact, fixed disk access is almost as good as direct disk access and involves only a small overhead compared to direct disk.

Flexibility of Fixed Disks

Now that Windows Server 2012 has become the standard for Hyper-V, we can also resize fixed-sized VHDs on the fly without having to shut down the virtual machine. In a way, the fixed-sized VHD isn’t so “fixed” after all as it was with previous versions of Windows Server. Being able to move fixed VHDs around and being able to resize them while running are crucial advantages over pass-through disks.

Inflexibility of Fixed Disks

The obvious reason why most users favor dynamically expanding disks is thin-provisioning of disk space; by allowing IT admins to “over-allocate” existing disk resources, they can squeeze in more VMs on the same server. The idea of thin-provisioning is taken to the next level in newer Windows Server editions that also allow dynamic memory configurations. While fixed disks may be grown live at a later point, the IT admin has still more work to do than when using dynamic disks: monitor the VM and log into it to resize the partition once the underlying VHDX has been resized. Dynamic disks are set to a maximum size, created with a minimal size to start off, and then grow from there automatically. On a well tuned system, this may actually work well, particularly when the IT admin is aware of the internals of each VM hosted on a particular server; however, such in-depth knowledge is rarely the case, as in the case of hosting providers, for example.

Maintaining System Stability by not Using Thin-Provisioning

Not too long ago, if economics students criticized the idea of ‘too big to fail’ and how banks rely on each other reciprocally they were ridiculed, since they “do not understand” statistics and the “superior” risk management used by the financial system. As we all know now, history has proven otherwise. Thin provisioning is quite similar to creating–potentially–huge “debt” and having nothing to back it with.

If system stability is your highest priority, you would not want to utilize thin-provisioning to a large degree. If multiple VMs request additional disk space and/or memory during peaks, there have to be enough resource to cover all scenarios. By allocating resources ahead of time you lose flexibility but gain stability by guaranteeing each VM its resources.

Just as banks work well, until there is a bank run or other global crisis affecting multiple banks, the Hyper-V host and all its VMs may work quite stably using thin-provisioned RAM and disk space; yet, the underlying assumption to make this work is that the IT admin has detailed knowledge on the internals of each VM and how it is being used.

Note that outside events are likely to trigger a domino effect on the Hyper-V host, such as Hyper-V backups, especially when multiple VMs are backed up simultaneously. High disk activity can become a bottleneck for other VMs and the live backup signal could trigger lots of services inside the VM to prepare for backup, for example SQL Server or Exchange Server. Then, all over sudden, “quiet” VMs become very active, request more RAM and CPU, and use more disk space, all simultaneously and all on the same disk.

Some smaller organizations use separate disks or disk arrays for each VM, either LUN, internal disks, or USB, as a low-cost solution for better performance, portability, and stability.

Hyper-V Backup Performance of Fixed Disks

Hyper-V backup will not necessarily be faster when using fixed disks. Imagine, for example, a fixed disk of 1 TB size where only 1% is actually being used. Backing up the entire disk will take hours, unnecessarily, because of the huge virtual disk file size; however, if there is deleted data in the VHD, it will be backed up as well and that may be useful in disaster recovery scenarios. For backup performance, on the other hand, it’s a far-from-optimal situation. A dynamic disk would do a better job. But once the VHD is being actively used again and its data contents grow, the dynamic disk may become fragmented.

Because fixed sized VHDs are allocated just once, a single host-level defrag is sufficient to ensure top backup performance. Hyper-V backups read the entire virtual disk file and since it is contiguous, all read-ahead caches and algorithms can be exploited to provide continuous peak transfer rates. On modern single drives this can easily exceed 150MB/sec per drive, on a striped RAID array it could achieve multiples of that , N * 150 MB/sec, where N is the number of disks striped across.

With dynamic disks, Hyper-V backup performance may suffer if disk fragmentation is present. Each time when hard disk heads have to be repositioned, a seek of dozens to hundreds of milliseconds has to take place. What makes it worse is that read-ahead logic and algorithms do not work as efficiently or do not work at all when that happens. In addition, the whole point of having a striped RAID is to provide faster access to contiguous files. Random access is not necessarily faster on a striped array compared to a single drive, it may even be worse in some configurations.

Hyper-V Backup: BackupChain

Try BackupChain for 20 days for free; it’s an all-in-one backup solution that includes Hyper-V VM backup and a lot more.

Chủ Đề