Speeding up Citrix PVS merge and boot times with VHDX, UEFI and ReFS

Citrix Provisioning Services is one of those components I love to sit down and play with to try and make operations such as vDisk booting faster. Since the release of Citrix PVS 7.7 there has been a few great enhancements that we can easily implement today to achieve better all-round performance with vDisks and Target Device VMs.

One of the first things we can make use of are VHDX vDisks. VHDX first came to the world in Windows Server 2012 Hyper-V. Citrix PVS historically used the VHD format for vDisks and brought out support for VHDX with PVS 7.7. The VHDX format has several advantages over VHD such as better performance, protection against file corruption and larger disk size limits.

The second improvement is support for UEFI Virtual Machines. UEFI is the replacement to traditional BIOS machines and is supported on Operating Systems running Windows Server 2012 and Windows 8 upwards. UEFI support was introduced to PVS in version 7.7 and allows for faster vDisk boots by making use of gigabit network speeds. Previously with Hyper-V running PVS 7.6 and below, older OS i.e. Windows Server 2008 R2 had to be created as a Generation 1 Virtual Machine. This required using the Legacy NIC, capped at 100Mbps to PXE boot in to a vDisk.With Hyper-V 2012 R2 and PVS 7.7+ you can use Generation 2 VMs with a Synthetic NIC to PXE boot. Not only do you have this NIC advantage but UEFI is also enabled on Generation 2 VMs for faster boot! Keep in mind that UEFI is only supported on Windows Server 2012, Windows 8 OS and above. To read more about Generation 1 VMs with Citrix read http://www.jgspiers.com/citrix-pvs-synthetic-nic-streaming-with-hyper-v/

The third is ReFS v2. ReFS (Resilient File System) was originally introduced with Windows Server 2012 to overcome some of the issues that exist with NTFS. When comparing performance against NTFS there wasn’t a great deal of difference. ReFS v2 was released with Windows Server 2016 and provides better provisioning (creation) and merging performance. Take for example merging checkpoints (snapshots) and backups that use checkpoints, or when you create a fixed VHDX, these operations benefit largely from ReFS. PVS 7.11 is Server 2016 ready and does support ReFS for your vDisk stores. Using ReFS to support your vDisk stores gives insanely quick merging vDisk times.

So, how about some examples of these optimisations?

Firstly, let’s compare UEFI vs BIOS machine boots to PVS vDisks. The below machine WS2012R2NonUEFIVHD is a Hyper-V Generation 1 machine that uses both BIOS to boot and boots in to a VHD formated vDisk.1-minAnd WS2012R2UEFIVHDX is a Generation 2 UEFI enabled machine and boots in to a VHDX formatted vDisk. 2-minThe Generation 1 machine has two vNICs added. One Legacy NIC for the boot process and a Synthetic NIC which takes over streaming once the Virtual Machine is running off the vDisk stream. 3-minJust to confirm the UEFI machine needs to have Secure Boot disabled as PVS cannot support Secure Boot enabled machines (unless you are using XenApp 7.12+). Also these two Virtual Machines will use a BDM ISO to receive the bootstrap. The UEFI machine has a UEFI enabled BDM ISO which is a supported boot method in PVS 7.9+.4-minThe first boot shows the BIOS machines booting in to a VHD vDisk. 24 seconds, not too bad at all. 5-min12 seconds for the UEFI machine booting in to a VHDX vDisk! That is half the time than the BIOS machine took. Notice the throughput is also twice as much.6-minNext we can look towards ReFS for vDisk merging times. On a Windows Server 2016 box with an unformatted partition that will act as your PVS vDisk store, choose ReFS as the file system when formatting the partition.7-minNow we have storage partitioned with ReFS, and vDisks will be placed on this storage.8-min

The first test is merging a 2GB differencing disk to the base vDisk using NTFS storage. Both VHDX and VHD vDisks do not experience much of a difference in merging times, VHDX being slightly faster.9-minThe second test is merging a 2.7GB differencing disk to the base vDisk on ReFS storage. The VHDX version is much quicker than the VHD vDisk. The time it took to merge a VDHX disk was an incredible 4 seconds! The time is took for the VHD disk was 2 minutes. 10-min4 seconds merge time for VHDX disk. 11-minAlso, read up on this blog post https://www.citrix.com/blogs/2016/01/12/turbo-charging-boot-times-with-pvs-7-7/ from Nick Rintalan which explains how using 2vCPUs on PVS 7.7+ Target Devices can again boost performance due to the PVS driver now being multi-threaded. By simply adding a second vCPU to my Target Device I was able to shave another 3 seconds off boot time and down to single digits.12-min

Leave a Reply