Running XenDesktop with IntelliCache on XenServer

By | August 24, 2011

I finally got time to upgrade our XenServer environment to 5.6 SP2 and enabled IntelliCache on XenServer. Enabling IntelliCache during installation is easy, just put a checkmark when asked “Enable thin provisioning”. XenServer will then format the local disk as EXT3 instead of LVM.

When XenServer is installed with Intellicache, you have to re-add the XenServer host in XenDesktop and enable Intellicache. In XenDesktop Studio add the XenServer host and put a checkmark when asked to use IntelliCache.

You can only enable this during addition of the host, not afterwards.

So now I have a XenDesktop / XenServer environment with Intellicache enabled. Time to see if this really works. We have an EMC SAN, but to proof that IntelliCache is doing its job, I decided to do the ultimate test. I created a NFS share on a Synology NAS, which is not really a fast storage. Then I installed a master Windows 7 machine with all applications on it. That didn’t go very fast. Shutdown the VM and opened XenDesktop Studio. In XenDesktop Studio I created a catalog with 5 pooled random desktops. I noticed that Machine Creation Services created a few desktops on the EMC SAN and a few on the Synology NAS. It is obviously spreading the load, but that’s not what I wanted, so I had to delete the EMC SAN from XenDesktop Studio. This can only be done from PowerShell, not from the console. Use the following command to remove storage (add your own names of course):

Remove-HypHostingUnitStorage -LiteralPath XDHyp:\HostingUnits\XSPool1 -StoragePath ‘XDHyp:\Connections\XenServer\EMC_XS_Disk1.storage’

I recreated the pooled random desktops, and now they were all created on the Synology NAS.

Now assign the desktops and boot them. Let’s see how it performs. First boot takes a while, but then it is running really good. When we take a closer look at the XenServers, you can see the caching happening. First we look on the XenCenter console. When you click on a XenServer host and choose Local Storage, you can see that Size used will grow (a Rescan may be required for the storage to see this).

You can also look at the XenServer itself in the path /var/run/sr-mount. In that folder, subfolders with guid names are created. In the subfolder related to the XenDesktop (that with the latest date stamp), you find several vhdcache files.

The biggest one is the cache of the masterdisk. The others are local differencing disks. Because I created pooled shared desktops, the cache file will be located only locally, there is no writing on shared storage. At reboot, the cache files are flushed. So this will significant reduce load on shared storage.

The cache files for private images are created both in local storage and on the shared storage.

So IntelliCache is really working, both for reads and writes. Performance of the vm’s is great when the cache is already created and load on shared storage is almost eliminated. Even from a cheap NFS storage, XenDesktop will run smoothly.