Tweak Intermediate Buffering for Better Citrix PVS Performance
I'm a big fan of Citrix Provisioning Services, both in streamed VMs and in streaming to physical desktops or servers. That being said, tweaking PVS for optimal performance is an important part of a successful implementation.
In my experience working with product and rolling it out, I have gained some significant tweaking skills that I hope will help you with your deployment. One of the tips I want to share with you today is "Disable Intermediate Buffering."
By default, the target device software dynamically determines whether or not to enable or disable intermediate buffering based on the size of the target device local hard drive. If the target device local hard drive is larger than the vDisk being streamed, it automatically enables intermediate buffering; if it is smaller, it disables it.
Now, in my deployments I have found that disabling intermediate buffering yields significant performance increase of the target device, both in boot time and in ongoing stability and performance.
So, what is intermediate buffering and why does Citrix not disable it by default? Tha'ts not so simple to answer. Intermediate buffering is actually a good thing if the hard disk drive controller can take advantage of it, as it improves write performance by leveraging buffering. This is a great thing if you are using server-class hardware. The problem is most target device hardware does not support this feature. As a result, performance is significantly degraded.
Now keep in mind that in most of my deployments where I have streamed to physical desktop that are 3 years or older, I have disabled intermediate buffering. However, in deployments where I have streamed XenApp to physical servers, I have left the setting at default and the performance was excellent -- this is due to the fact that the disk controller understands and can take advantage of the feature.
When I have streamed to VMs also running on server class hardware I have not had an issue, so in my experience this has been detected when streaming to physical desktops, typically in school deployments where we use PVS in the labs with older machines.
If you are experiencing performance issues with PVS or slow boot times and have exhausted all the traditional troubleshooting steps, disable intermediate buffering and give me a holler if it works.
To disable follow these steps:
- Change the vDisk to Private Image Mode and boot the target device
- Open the registry and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ BNIStackParameters
- Create a DWORD value name: WcHDNoIntermediateBuffering and give it a value of "1"
- Put your vDisk back into Standard Image Mode
Once you reboot, you should immediately notice the performance difference by how fast you get to a login screen. If you have been experiencing frequent target device freezes, this should also take care of that.
Consequently, if you want to enable intermediate buffering, you can do that by setting the registry value to 2.
There is a third value available, which is "0." It's the default value when the registry key is not present and dynamically determines whether to enable or disable intermediate buffering.
Posted by Elias Khnaser on 05/17/2011 at 3:00 PM