We have been fighting storage IO battle since day one. There are many flash technologies on the storage vendor side. Now Citrix Provisioning Service has an awesome and easy to use feature called RAM Cache on the hypervisor RAM that can reduce storage IO by 90%. RAM cache is great for PVS non-persistent desktops. For MCS or any persistent desktops, RAM cache is not ready yet.
I tested RAM Cache last year. The result was unbelievably good. I shared at NetApp Insight Vegas and Berlin. In January, I attended Dan Feller‘s session “Technical Update for XenApp and XenDesktop – 2015 Edition” at Citrix Summit. Now it is time to promote RAM Cache.
How to use RAM Cache? At PVS console, select vDisk properties and choose Cache type as “Cache in device RAM with overflow on hard disk”. This will use hypervisor RAM first and then use hard disk. Choose the RAM size based on OS type.
RAM sizing consideration
- 256 MB for Win7 32bit
- 512 MB for Win7 64bit
- 2GB-4GB for XenApp VM
More detail on sizing RAM cache, check Size Matters: PVS RAM Cache Overflow Sizing. Also as a best practice, defragment the vDisk before deploying the image and after major changes.
Now let me share the test setup and result:
Cisco UCS Server CPU: 20 CPUs X 2.799 Ghz Intel CPU E5-2680 v2@ 2.80GHz
Server RAM: 48 GB
Hypervisor: vSphere 5.5
NetApp FAS3240 with 2 shelves HDD disks
VM CPU: 1vCPU
VM RAM: 2GB
VM OS: Windows 7
VM write cache: 6GB
RAM CACHE: 256MB
Load generation tool
I ran 4 tests to find out if RAM cache is useful and what is the optimized RAM Cache size compared to Citrix’s recommendation.
1. Baseline without RAM cache
2. With RAM cache size as 256MB
3. With RAM Cache size as 512MB
4. With RAM Cache size as 1GB
Test result: I use NetApp perfstat to capture the write cache NFS volume total IOPS.
The blue line is the result without RAM Cache. The IO saving is tremendous.
What is the lesson learns?
Increase your write cache when you use RAM Cache
Storage is 4k based and RAM is 64MB. “If transitioning an environment from Cache on HDD to Cache in RAM with overflow to disk and the RAM buffer is not increased from the 64MB default setting, allocate twice as much space to the write cache as a rule of thumb.”
Different performance on different hypervisor
Reduce storage IO. The data is from Dan Feller’s deck at Citrix Summit.
– By 99% with XenDesktop
– By 80% with XenApp on Hyper-V
– By 24% with XenApp on vSphere
Defragment your vDisk to save your write cache size
“Defragmenting the vDisk resulted in write cache savings of up to 30% or more during testing.”