Write Cache in Provisioning Services Server

In PVS, write cache describes all the cache modes. The write cache includes data written by the target device and the user data. In vDisk caching mode, the data is not written back to the base vDisk. Instead, it is written to a write cache file in one of the following locations

Cache on device hard disk
Cache in device RAM
Cache on device RAM with overflow on hard disk
Cache on server

When the target device is booted, write cache information is checked to determine the presence of the cache file. If the cache file is not present, the data is then read from the original vDisk file. All current versions of PVS have the option for distributing write cache. It is called Multiple Write Cache Paths. The multiple write cache paths (for a store) option provides the capability of distributing the write cache files across multiple physical media. This feature helps to improve I/O throughput for heavily loaded servers.

When a target device starts the server chooses one of the write cache paths from the list based on the MAC address of the client. The goal of selecting a path based on the MAC address is to get an even distribution of the clients across the available paths. The algorithm selects the same path for a given client each time that client is booted. This functionality is needed to ensure that during a High Availability (HA) failover the new server would choose the same write cache for the client (otherwise it would not be able to find the write cache file and the client would hang). If the defined write cache path is not available to a server, the server falls back to the standard vDisk path.

Cache on device Hard Disk

Requirements
•Local HD in every device using the vDisk.
•It must be a Basic Volume pre-formatted with NTFS file system with atleast 512MB of free space.

The cache on local HD is stored in a file on a secondary local hard drive of the device. It gets created as an invisible file in the root folder of the secondary local HD. The cache file size grows, as needed, but never gets larger than the original vDisk and frequently not larger than the free space on the original vDisk. It is slower than RAM cache, but faster than Server cache and works in a HA environment.

The lack of space on this drive will bring some slowness in user’s session and this drive needs to be expanded a bit to get back a normal user experience.

To expand these disks two actions need to be done :
1. Expand the Virtual Machine hard disk
2. Expand the disk within the Windows Operation System

Cache in device RAM

Requirement
•Appropriate amount of physical memory on the machine.

The cache is stored in client RAM. The maximum size of the cache is fixed by a setting in vDisk properties. All written data can be read from local RAM instead of going back to the server. RAM cache is faster than cache on server and works in a HA environment.

Cache on device RAM with overflow on Hard Disk

Requirements
•Provisioning Service 7.1 or later.
•Windows 7, Windows Server 2008 R2 or later.
•Local HD in every device using the vDisk.

When RAM is zero, the target device write cache is only written to the local disk. When RAM is not zero, the target device write cache is written to RAM first. When RAM is full, the least recently used block of data is written to the local Write Cache disk to accommodate newer data on RAM. The amount of RAM specified is the non-paged kernel memory that the target device consumes.

Cache on Server

Requirements
•Enough space allocated to where the server cache will be stored.

Server cache is stored in a file on the server, or on a share, SAN, or other location. The file size grows, as needed, but never gets larger than the original vDisk, and frequently not larger than the free space on the original vDisk. It is slower than RAM cache because all reads/writes have to go to the server and be read from a file. The cache gets deleted when the device reboots, that is, on every boot the device reverts to the base image. Changes remain only during a single boot session. Server cache works in a HA environment if all server cache locations to resolve to the same physical storage location. This case type is not recommended for a production environment.

Advertisements

About Murugan B Iyyappan

Working as a Technical Specialist - Citrix solutions architect with 13 years of experience in the IT industry. Expertise in Citrix XenApp and VMware in Windows platform.
This entry was posted in Citrix, Citrix XenApp and tagged , , , , , , , . Bookmark the permalink.