With Citrix Provisioning Server the first Application Start in a user session has mostly some delays, until the application is cached. This time can be reduced with a new Enhancement in BIS-F 7.1912 an higher calling “Hydration”. This Feature can be enabled in the BIS-F GPO > Citrix > Hydrate files on PVS Servers. In this KB Article you can see the difference with/without Hydration and the Impact for the Environment.
Why to Hydrate
Citrix PVS servers will operate faster after some period of time due to the file system caching files into RAM. However, if you access a file that PVS has not cached previously then there may be a substantial delay in getting those bits into the file system cache. This is due to PVS traversing the network back to the source file to pull those bytes. If the storage those bytes reside on is under some stress or delayed for some reason then it will take even longer to access the file making PVS appear slow.
How does the Hydration work ?
All files that configured in the GPO above will be run through a [System.IO.File]::ReadAllBytes command, this opens the binary file, reads the contents of the file into a byte array, and then closes the file.
With the GPO default Settings for the Citrix PVS Hydration I consume 30,6 GB for the 2 folders with all files, but note the hydration get *.exe and *.dll files only in the default configuration.
Depending on the files to be cached this needs a litte bit of time. In the follwoing example we ne up to 5 minutes (08:01:14 – 08:06:39) for the hydration and for the start of the citrix desktop service to register the VM on the Broker takes up tp 7 minutes for the complete process (07:59:49 – 08:06:53)
Starting BIS-F personalization – 7:59:49 AM
12/28/2019 7:59:49 AM | PVS-Master-Win10-1809 | INFORMATION... | Processing function Initialize-BISFConfiguration
Starting PVS Hydration – 8:01:14 AM
12/28/2019 8:01:14 AM | PVS-Master-Win10-1809 | INFORMATION... | =========================== 10_PersBISF_HydratePVS.ps1 =========================== 12/28/2019 8:01:14 AM | PVS-Master-Win10-1809 | INFORMATION... | Processing function Test-BISFPVSSoftware 12/28/2019 8:01:14 AM | PVS-Master-Win10-1809 | INFORMATION... | Processing function Test-BISFService 12/28/2019 8:01:14 AM | PVS-Master-Win10-1809 | INFORMATION... | Service BNDevice exists 12/28/2019 8:01:14 AM | PVS-Master-Win10-1809 | INFORMATION... | Product Citrix Provisioning Services Target Device Driver (PVS) (Version 18.104.22.168) installed 12/28/2019 8:01:14 AM | PVS-Master-Win10-1809 | INFORMATION... | Caching files with extensions *.exe,*.dll in C:\Program Files 12/28/2019 8:01:52 AM | PVS-Master-Win10-1809 | INFORMATION... | Caching files with extensions *.exe,*.dll in C:\Program Files (x86) 12/28/2019 8:06:39 AM | PVS-Master-Win10-1809 | INFORMATION... | =========================== FINISH SCRIPT ===========================
Starting Citrix Desktop Service – 8:06:53 AM
12/28/2019 8:06:53 AM | PVS-Master-Win10-1809 | INFORMATION... | The Service Citrix Desktop Service is successfully in Running state
The Hydration using the non-paged pool memory, a comparison bettwen both worlds see below.
The vDisk RAM Cache is set to 8192 MB
|Hydration enabled||Hydration disabled|
In the following chart I’ve compared both environments with the data from the table above.
For a better user experience it’s possible to use the PVS Hydration, but meassure it in your environment to see if the PVS RAM Cache is large enough. If you booting up multiple VM’s at the same time please also take a look to the Bootstorm, much more data is transfered during startup between the PVS Server and the VM.
In Addition it make sense to use PVS Hydration in combination with the Citrix Desktop Service Delay, the VM is registered on the Broker first if the Hydration is finished.
Citrix Reference Article Analyzing PVS RAM Cache with Overflow