Citrix Machine Creation Services as of XenApp/XenDesktop 7.9 provides the ability to write to memory with overflow to disk just like what is available with PVS using RAM w/ overflow to HDD. This greatly decreases write I/O so you don’t have to rely as much on the underlying storage or worry about hitting a storage bottlenecks as you scale the desktop environment.
Previously with MCS, temporary writes went to the delta/differencing disk attached to the VM. You now have the option of using temporary memory (RAM) to handle the caching of writes and a temporary disk in the event the RAM cache becomes full. When overflowing writes to a disk keep in mind that you don’t want this to be the point of a bottleneck so size the environment properly and place temporary disks on storage that won’t pose a big degradation in performance. The more RAM you assign to the memory cache the less chance writes will ever reach disk. You could reduce IOPS by as much as 95% depending on how much RAM you can assign to the cache!
Temporary memory 256MB for VDI (desktop) and 2GB for Session Host (server) machines is recommended, which falls in line with what is recommended when using PVS RAM cache. If your VDI machines are 32-bit, 256MB is probably optimal. This is because the OS on 32-bit is limited to 4GB RAM maximum with 2GB assigned to kernel-mode for things like handling device driver code, kernel structures and so on that are either on paged or non-paged memory pools. When configuring MCSIO RAM on these VMs, the memory is shared with the non-paged pool. Given that MCSIO RAM can grow up to 50% larger than what you specify/allocate, you need to ensure the non-paged pool will always have enough memory or risk the machine crashing.
The temporary disk size is recommended to equal the free disk space of the VM plus the page file size. I normally set a 20GB cache size and get away with it but it all depends on your own environment.
With your Citrix Studio console open, running a XenApp or XenDesktop 7.9 farm, create a new Machine Catalog provisioned by MCS. Existing standard MCS catalogs cannot be converted to MCS using cache as an MCSIO specific driver is installed to the VMs whilst being provisioned. You have the following options during the MCS Machine Catalog creation wizard:
Memory allocated to cache (MB) – Provide a value in MB for how much RAM you want to assign to the cache. You have the option to use only the memory cache but be aware if the memory cache runs dry your VMs will become unstable and likely freeze or blue screen. For this reason it is recommended to deploy a temporary disk cache as a backup just in case.
Disk cache size (GB) – Provide a value in GB for how much disk space you want to dedicate to the disk cache. You can choose to create only a disk cache and this means VMs will perform like they always have done producing the same IOPS as they would when provisioned without any cache. The good thing about using a disk cache is that you can separate writes on to different storage away from the base image and differencing disk. It is always recommended to create a disk cache when using RAM cache just to be safe in the event that the RAM cache runs out of free space.
Note that you also have the option to not configure any cache so MCS machines will be created and operate as they always have done.
Click Yes. Complete the MCS Machine Catalog creation wizard. You will now have machines optimized for writes.
So using a simple file copy operation you can see the difference between a 2.6GB file copied to an MCS machine using cache (1GB) vs. one without cache. Reaching a max of 110 write IOPS per second on a 15K spindle.
What about general daily tasks such as internet browsing and file browsing? You can see results below comparing normal operations on an MCS provisioned machine using cache vs. one without. There is no direct hit on IOPS when the cache is in use!
Using Performance Monitor on the Windows VDA you have a number of different counters that you can use to track performance and usage of the MCS cache. One particular useful counter is Cache memory used. This counter shows how much of the cache memory is in use. A simple test of copying a 710MB file to the VDA increased the Cached Used performance counter to accurately report what was now held in cache. Also note that 0 write IOPS were produced during the file copy.
This is a great improvement for MCS provisioned machines and now puts MCS right up there beside PVS when it comes to IOPS performance.
- MCSIO works on Desktop/Server non-persistent and Session Host machines. Citrix Personal vDisks do not work with MCSIO ruling out persistent desktops.
- The more RAM you assign to a cache the less IOPS storage will ever have to deal with.
- You can not migrate existing MCS provisioned catalogs to MCSIO, you must recreate them.
- In the event that temporary memory space runs out, the temporary disk storage is used. Most recently used blocks of data are kept in memory for performance and least used are flushed to disk quite like how PVS RAM caching works with overflow to HDD.
- MCSIO can limit the amount of memory it uses in the event the VM becomes overloaded – the non-paged pool memory consumption on a machine is monitored and if it reaches 70% of available memory action is taken to suppress MCSIO memory usage annd instead write to disk until the non-paged pool memory consumption drops.
- Disk cache and memory cache size cannot be changed once the Machine Catalog has been created.