Saturday, March 03, 2012

Citrix Provisioning Services and RAM cache

I've been working on a problem recently involving a situation where we want to do some desktop virtualization but are having a very hard time addressing the disk I/O requirements as the environment scales up. 

Staring at some architecture diagrams it occurred to me that if these were physical systems I'd be using RAM cache with PVS ... and why not do that with my VM's?   In this particular instance it's more convenient and cost effective to put all that temp data in RAM than it is to build a SAN infrastructure that's capable of keeping up. Putting the PVS cache in RAM means that the SAN won't ever see the disk I/O associated.  We can still attach a small disk to the VM to deal with things like page files, print spoolers, and event logs if needed - but the I/O on these should be light.

This led me to another question - how much RAM can we use for cache?  The answer is important as the amount of cache we have will be a factor in determining how frequently we have to reboot the systems.  Turns out the answer depends a bit on the version of Windows you're using.
 
To find out I built a couple VM's and started playing with settings.  Turns out -
  1. RAM cache is definitely  still available in PVS 6.0 (someone I talked to suggested it might not be - Citrix if you're thinking about removing this ... DON'T!)
  2. RAM cache does work with VMware VM's
  3. You can allocate GOBS of RAM cache if you want on 64-bit OS (see Win 2K8R2 screenshot below), The VM's OS sees the memory, but knows its' not available.  The screenshot is from a 24GB VM with 16GB of PVS cache.
  4. Windows 2008R2 with 24GB RAM and 16GB PVS Cache
  5. You can allocate up to about 3.5GB of RAM cache if you want on 32-bit OS (see Win 2K3R2 screenshot below). 
  6. Windows Server 2003 R2 x32 with 6GB of RAM and 4096MB PVS Cache
  7. Allocating more PVS cache on the 32-bit OS will 'hide' the ram from the OS, but the PVS cache won't use more than the 3.5GB.  I tried this with a 12GB VM, with 8192MB for PVS cache- ended up with windows seeing 4096MB of RAM, PVS using 3584MB of RAM, and the other 4+/-GB of ram vanishing;  Tacking the PVS RAM cache for the vDisk down to 4192MB left me with the 32-bit OS seeing 8GB, and PVS using an additional 3584MB of RAM for the cache.
So my conclusion - my concept of using RAM cache with VM's is viable; though we'll need to make sure we get things dialed in so that we stay within the RAM cache.  This will be particularly important for the 32-bit VMs.  However this challenge isn't any different than using PVS RAM cache in the physical world.



No comments: