On the Virtualization with Hyper-V Technical Resources page, we’ve posted the “Virtual Hard Disk Performance White Paper.” This paper contains information about the performance implications of operations that use a differencing disk with Hyper-V, as well as the pro and cons of using differencing disks. All the information in this document is relevant to using differencing disks within a Virtual Desktop Infrastructure (VDI) environment. In this post, we cover the specifics of implementing differencing disks within the Microsoft VDI system.
There are two types of VDI implementations with Remote Desktop Services:
- Personal virtual desktops: Virtual machines that are permanently assigned to users by an administrator. This configuration is saved in Active Directory Domain Services. A personal virtual desktop is typically used when a user needs a dedicated virtual machine (VM) with administrative privileges (for example, a user might want to install applications).
- Virtual desktop pools: Groups of identically configured virtual machines that are temporarily assigned to users by the Microsoft VDI system. Administrators can configure a VM to be a part of a pool.
When using a personal virtual desktop, there is no need to use a differencing disk. Differencing disks offer a shared common parent (base) image. The parent image contains all the data, which will not change greatly in the child (differencing) disks. In the case of a personal virtual desktop, the child image is prone to change from its parent. The owner of the personal virtual desktop makes normal configuration changes to their personal desktop, installs applications, and performs updates to the operating system. These changes to the personal virtual desktop make changes within a child image and negate the need for a parent image. In fact, the child image can easily become larger than the parent image. Therefore, the pros of reducing disk space usage by using a differencing disk are lost with a personal virtual desktop.
When using a virtual desktop pool, users will be given access to a pooled desktop image for a predetermined time, which is usually the life of their session. After their predetermined time, usage of the image is over, and the disk image is restored back to its original state. From a disk space utilization standpoint it makes good sense to have the original state restoration point be a differencing disk for all of the virtual desktops in the pool. This will allow the parent image to maintain a static disk space usage while the child images will grow during the life of the session and be deleted after the session life is over.
For a list of the pros and cons of using a differencing disk (from the Windows Server 2008 R2 VHD Performance paper), see the following chart.
*note: dynamic disks face many of the same performance issues that differencing disks face
We definitely see the pros of using a differencing VHD in the virtual desktop pool scenario. The largest benefits are:
- Acceptable performance
- Disk space savings
The cons of using a differencing VHD in the virtual desktop pool scenario are either not important or are outweighed with the disk space savings:
- “Write performance”: With the use of virtual desktop pools, the writing to disk performance loss is an acceptable loss due to the disk space savings. Make sure you look at the performance information in the Virtual Hard Disk Performance paper to see the actual number differences in write performance to ensure it is acceptable in your scenario. For write operations of user data, the use of a shared drive for writing user data out (as is the case with roaming profiles and folder redirection for user directories) will eliminate some of the need to write to the actual differencing disk.
- “Dynamically expanding and differencing VHDs cannot exceed 2040 GB, May get VM paused or VHD yanked out if disk space is running out due to the dynamic growth”: The destruction of a virtual desktop pool after a user’s session is over helps to mitigate the large need for disk growth, but make sure you plan for disk space capacity before putting together your deployment.
One thing to note with the use of differencing disks is the fact that they do grow with write operations. In the case of a virtual machine “idle,” read and write operations still occur within the operating system, such as spyware and virus scanning and definition updates, Windows update processes, and various scheduled system tasks. Since these occurring functions provide write operations, the virtual disk will grow. A good practice is to allow idle VM’s to be reclaimed by the system and restored back to their original (parent) state, therefore deleting the disk growth that occurred while the VM was operating or sitting idle.
Stay tuned for a tuning guide which will give you some ideas about what services, processes, programs, or settings you can tweak in a VDI environment that can also affect VHD disk space growth.
Disk optimization for differencing disk usage
Be aware that the disk read operations on a parent disk are very high. Therefore, placing the parent disk on Solid State Drives (SSD) should help because SSDs have high read IOPS.
In cases where a SAN is in use and a cluster shared volume is used to share the parent disk between Hyper-V hosts, expect decreased performance due to the overhead of coordinating the read/write operations between the Hyper-V hosts.