Fun with the VDA 7.6 & HDX Encoding

The Citrix Virtual Delivery Agent. The VDA. The piece of technology that bring many of our Citrix products to life and allows us to delivery resources to our end users. Without it, our Citrix environment simply wouldn’t function. So we love it, right? Well yeah. But in that same breath you can also come to hate it. Especially when it goes wrong.

Last year, we undertook a project to upgrade all our persistent Windows 7 VDI from the VDA 5.6 to the VDA 7.6. With an environment that consisted of 35,000+ VM’s so this was never going to be an easy task.

I could write a short novel on all the issues that we encountered. From installation failures, to black screens, to application conflicts, something new always seemed to crop up with each deployment. And when it did go wrong, there was a lot of manual intervention involved. Even if we had a deployment success rate of 95%, on a batch of 1000 VM’s, that would mean 50 VM’s that were inaccessible and would impact the customer. Many hours were spent over countless weekends performing clean up and repair. Rather than delve in to all the various issues that we ran in to, I want to focus instead on one interesting problem that came up towards the start of the project as this might be something that others could easily overlook, just like we did. All the VM’s were running the VDA 5.6 and they were residing on a XenDesktop 7.1 farm.

One of our first big deployments was to VM’s where the users were literally on the other side of the world to the datacentre hosting the clients. These users had complained of some performance issues and a pilot of the VDA 7.6 to some of them had reported a much more positive user experience, eliminating their performance issues. So over a couple of deployments of several hundred VM’s, the VDA 7.6 was pushed out and all the users were much happier. A happy ending, right? Well, not quiet. Right after the last deployment, the entire location started reporting latency and performance degradation again.

After a couple of hours of fruitless troubleshooting, we found out that the circuit that connects these users was running at 100% utilization. No wonder they were experiencing slow performance. And looking back over the previous couple of weeks, we were able to see that the bandwidth usage had started to climb exactly when we had started the VDA deployment.

So what was the cause of the increased bandwidth consumption? One of the first things that you would notice when you first run your VM after upgrading from the VDA 5.6 to the VDA 7.6 is that you now have Aero visual desktop effects enabled. These additional graphics features are going to consume a considerable amount of additional bandwidth. Using the following WMI query, we were able to see that the Desktop Composition Redirection display mode was in use. This can also be done with the HDX monitor. You can find instructions on using both the WMI queries and the HDX Monitor here and some really good information about the different display options here.

WMI Query:
wmic /namespace:\\root\citrix\hdx path citrix_virtualchannel_d3d get /value

Results to check:
IsActive=Active
Policy_AeroRedirection=TRUE

We found out that this is set to enabled by default in the XenDesktop policies. A quick policy change ensued and we waited for users to log off and on again overnight to see if the bandwidth consumption dropped. It did. But not as much as we were hoping for, it was still running above 85% utilization. Using the WMI queries, we found that VM’s were now using the H.264 display option. Depending on the Receiver version the end point is running, it would get a result for H.264 or H.264 Compatibility Mode.

WMI Query:
wmic /namespace:\\root\citrix\hdx path citrix_virtualchannel_thinwire get /value

Results to check:
Component_Encoder=DeepCompressionV2Encoder
IsActive=Active

Component_Encoder=CompatibilityEncoder
IsActive=Active

The final option available to us was Legacy Graphics Mode which is not enabled by default in the XenDesktop policies. Indeed, this was actually the perfect use care for Legacy Graphics Mode. In the XenDesktop handbook, under the design section for HDX Encoding Method, it recommends this for WAN environments delivering Windows 7. One more quick policy change to enable Legacy Graphics Mode and the when users started to log on again, the bandwidth dropped dramatically again, right back to the level it had been at before we started the VDA 7.6 deployment.

This might be old news to some but it is something that can be easily overlooked, especially for those of use that support large enterprise environments where upgrades can’t happen overnight and we are only catching up on versions now. We have less than 100 VDI left in our VDA upgrade project, I guess it is time to start looking ahead to Windows 10 and what impact that will have on bandwidth. I’m sure that project will be just as much fun as the VDA 7.6 was…

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">