Introducing MCS Storage Optimization

Machine Creation Services (MCS) Storage Optimization (MCSIO), is a new feature within MCS provisioning and was introduced in XenApp and XenDesktop 7.9.  This new feature helps reduce traffic to shared storage in XenApp and XenDesktop environments.

What is MSCIO and how does it work?

There are two provisioning solutions:

  • A disk-based solution with MCS.
  • A network based solution with Provisioning Services (PVS).

Both solutions yield the same end result of provisioned machines, but offer different delivery methods depending on your requirements.

MCS provisioning leverages the underlying hypervisor. However, the resulting input/output (I/O) profile of an MCS provisioned environment is dictated by your chosen hypervisor and shared and network storage.

PVS contains a built-in disk caching mechanism, which gives the flexibility of being able to manipulate and reduce your virtualization I/O. With MCSIO, Citrix introduces the advantages seen in PVS disk write caching to MCS.

MCSIO reduces I/O load through a two-tier caching system. An in-memory cache, known as the “temporary memory cache,” is used as the first storage tier. Overflowing onto an additional disk attached to the provisioned machine as the second tier, is known as the “temporary disk cache.” This is comparable to PVS RAM Cache with overflow, but now for MCS.  Unlike PVS, MCSIO is primarily intended for caching of write IOPS, it can read cached data and impact read IOPs on shared storage.

Changes in the architecture introduce a subtle, but important change to how MCSIO operates compared to standard MCS. In MCS, the delta disk cached all guest read/write operations and resides on the same storage as the master disk. In MCSIO, your temporary cache handles the I/O operations once handled by the delta disk. Now, you can separate persistent and temporary data. You can store the temporary cache disk on different storage to the master disk, such as local hypervisor storage or any supported shared storage and tailor your RAID configurations to the workload.

To achieve this, MCSIO provisioned machines have an additional driver to intercept and manage IO operations.  When the operating system boots, it start drivers, including the MCSIO driver, which are read from the base disk.  Only after loading the MCSIO driver, can writing to temporary cache take place. Then the MCSIO driver is able to intercept and cache the writes which would have gone to the delta disk in its temporary memory and disk cache.  What this means is that your temporary cache handles the I/O operations once handled by the delta disk.  The delta disk is still present on MCSIO provisioned machines. However, it is only used by MCSIO for maintenance tasks.

Advantages over using traditional MCS provisioning

  • By using the temporary memory cache, you can significantly reduce your I/O write load on storage.  You are trading RAM for storage I/O, which means you can scale up the hosted machines on your shared storage or downsize its requirements.
  • It presents the option to optimize I/O traffic for your VDI environment.
  • The separation of persistent and temporary data means that you can distribute your I/O load in your environment. For instance, the master disk can be on a storage configured to optimize read operations, while temporary disks can be on a storage that optimize write operations.
  • With reduced I/O load from the memory caching mechanism, you can use local storage for temporary data, which can be a more cost effective option than using shared network attached storage.
  • You can size the amount of temporary memory cache, thus alter your I/O profile to suit your needs.  With sufficient memory you can cache all writes to memory and not use the second tier temporary disk.

Below is a representation of MCS and MCSIO and what has changed.

MCS default configuration

MCSIO temporary memory and disk cache

Temporary memory cache only mode: This mode is equivalent to the PVS “cache in device RAM,” where I/O operations are kept in the memory cache. This option provides better throughput, better response times, and higher IOPS/throughput because it writes to memory rather than disk. If running in this mode, ensure RAM has been sized according to the workloads expected. If the temporary memory cache is full, the device can become unusable, where the system hangs or an error on a blue screen appears.

MCSIO Temporary memory cache only

Temporary memory cache only mode: This mode is equivalent to PVS “cache in device RAM,” where I/O operations are kept in the memory cache. This option provides better throughput, better response times, and higher IOPS/throughput because it writes to memory rather than disk. If running in this mode, ensure RAM has been sized according to the workloads expected. Once the temporary memory cache is filled, the device will become unusable, anticipate system instability as described above, if you fill the RAM cache.

MCSIO temporary disk cache only

Temporary disk cache only mode: This mode gives the option of redirecting the delta disk write operations to physical storage other than the storage used for the master operating system disk. You would use this mode if you are only looking to distribute your persistent and temporary data to different storage tiers, for instance optimized for read or write operations. MCSIO drivers are installed and used to direct data to the temporary cache disk.  You are required to specify the disk size. It is important to ensure there is sufficient disk space available so the disk cache space does not run out on the provisioned machine.

Important facts to remember about the MCSIO feature and its behavior:

  • MCSIO only works with non-persistent VDI and RDS provisioned machines.
  • MCSIO works with Citrix XenServer, Microsoft Hyper-V and VMware vSphere and supports both Microsoft Windows desktop and server operating systems.
  • You are unable to migrate existing catalogs to MCSIO provisioned catalogs. MCSIO provisioned machines require the installation of additional MCSIO specific drivers at the point of creation.
  • The temporary memory cache reserves a portion of the devices non-pool paged memory exclusively for the caching I/O operations. For example, creating a virtual machine with 3 GB, the operating system and applications will only have access to 3GB minus the allocated temporary memory cache.
  • Data is written to the temporary memory cache first.  Once the cache is full, data is written to the temporary disk. To optimize performance and system responsiveness the most needed blocks of data are held in temporary memory and the least recently used blocks are flushed to disk.
  • Although MCSIO is primarily used for caching of write I/O, it impacts read operations on the system. It makes use of temporary cached data before attempting to read from shared storage, thus impacting the read profile of an environment.
  • Data is written to temporary storage in varying sizes. MCSIO attempts to coalesce smaller incoming write operations into larger blocks, up to 1MB, to reduce the write IOPs to the overflow disk.
  • If a machine is seen to be heavily loaded, MCSIO limits its memory consumption until the system load level drops. MCSIO monitors non-pool paged memory consumption. If this is more than 70% of the available resource, MCSIO starts writing data to the temporary cache disk until this drops.
  • The temporary memory and disk cache size is preconfigured default settings. You can alter the default settings during creation to suit your needs.  You can alter these values if you have I/O or memory intensive applications.  The defaults for the temporary memory cache is 256MB for all machine catalog types. For the temporary disk cache, it is 10GB for desktop operating systems.  For server operating systems the temporary disk is equivalent to size of the system disk.
  • The size of the temporary disk cache and memory cache is set during catalog creation and can’t be altered without re-deploying a new catalog.
  • You can choose to enable MCSIO and place the cache disk on shared storage. You will still benefit by reducing I/O load from the memory caching mechanism, dependent on your workload and temporary memory cache configuration.
  • Rebooting the provisioned VMs resets the temporary memory and disk cache.
  • Citrix Personal vDisks are not supported on MCSIO provisioned machines.

This is the first in a series of blog posts on this subject. The next post in the series will focus on demonstrating how MCSIO configurations influences shared storage IO.

Further information
If you are new to MCS please read the following blogs on Machine Creation Services primer 1 and primer 2.  Due to the similarities between PVS and MCSIO caching, you can refer to the following blogs for further information about concepts discussed for PVS caching and PVS sizing guides.

syn17-f-banner-blogfooter-729x90