Optimising TCP for Citrix HDX/ICA including Netscaler

Marius Sandbu – NGCA (NVIDIA GRID Community Advisor)  aka Clever Viking!

The TCP implementation within Citrix HDX/ICA protocol used by XenDesktop and XenApp and also Citrix Netscaler is pretty Vanilla to the original TCP/IP standards and definition and the out-of-the-box configuration usually does a good job on LAN. However, for WAN scenarios particularly with higher latencies and certain kinds of data (file transfers), Citrix deployments can benefit greatly from some tuning.


One of our new NGCAs (NVIDIA GRID Community Advisors) Marius Sandbu has written a must-read blog on how to optimize TCP with a Citrix Netscaler in the equation: http://msandbu.org/tag/netscaler-tcp-profile/Marius highlights some of the configuration optimisations hidden away in the Netscaler documentation and you’ll probably want to refer to that  documentation too (https://docs.citrix.com/en-us/netscaler/11-1/system/TCP_Congestion_Control_and_Optimization_General.html).

Citrix HDX TCP is not optimized for many WAN scenarios but at the moment it can also be tuned manually following this advice: CTX125027 – How to Optimize HDX Bandwidth Over High Latency Connections. This is one configuration I’d love to see Citrix automate as having to tune and configure the receiver is fiddly and also not possible in organisations/scenarios where the end-points and server/network infrastructure might be provided by different teams or even companies (e.g. IaaS).


For Citrix NVIDIA GRID vGPU customers with looking at high network latency scenarios – it really is worth investigating the potential and benefits of TCP window tuning. I’d be really interested to hear feedback if you have tried this and what your experience / thoughts are too!


Norwegian, Marius Sandbu was recently awarded NGCA status by NVIDIA for his work with our community through his Netscaler, remoting protocols and experience with technologies such as UDP and TCP/IP. You can follow him on twitter @msandbu and of course do follow his excellent blog on http://msandbu.org/ !!!

Scalability benchmarking – XenDesktop 7.7 and Windows 7

SSSFellerWhen I worked at Citrix one of my now colleagues at NVIDIA (Jason Southern) came to us with a proposal and PoC (you can read the blogs about that experiment, here) for us to implement templates to assist users to configure and optimize HDX graphics for XenDesktop and XenApp (Template details – here). XenDesktop/XenApp 7.6 FP3 saw the release of these templates which allowed users to configure their graphics for the specific needs of their users (user experience vs. server scalability) and network conditions (WAN/limited bandwidth etc.). Continue reading Scalability benchmarking – XenDesktop 7.7 and Windows 7

HDX Graphics Policies, really are simpler than you think!

A wrote a blog a while ago (read it here) about how although the Citrix Studio Console interface shows every policy for every graphics mode, most modern graphics modes need very little configuration and are affected by a few policies only. Continue reading HDX Graphics Policies, really are simpler than you think!

Why CAD users really care about hidden-line and what you need to know about it to test remote graphics!

In a past life I was a kernel engineer on Parasolid the numerical heart within many top CAD applications such Ansys Workbench, Dassault Solidworks, Siemens NX and Solid Edge, Bentley, Nemetscheck, Missler Top Solid; I lived, breathed and obsessed about CAD workflows, how users construct parts and use CAD applications. Now I’m in Cloud computing and VDI, I still get to work with CAD applications but am working in an industry where for many other than the customer – a CAD application is just another VDI or virtualised app or workload.

Continue reading Why CAD users really care about hidden-line and what you need to know about it to test remote graphics!

Comparing Apples to Pears! Benchmarking Thinwire Compatibility and Other HDX Graphics Modes

applesOne of our really experienced experts has just done a blog on some evaluation he did on Citrix’s hot new graphics mode: http://trentent.blogspot.ca/2015/09/performance-differences-in-citrix-hdx.html. Now this guy knows what he is doing but I’m a little worried others might not fully understand what has been done or the implications for the results. Trent did some tests flipping the encoder via a registry key. We do not encourage users to play with registry keys, occasionally they can prove useful to tweak a system, but really if that is being done we should be exposing the control via properly documented policies.

Continue reading Comparing Apples to Pears! Benchmarking Thinwire Compatibility and Other HDX Graphics Modes

When less is more! Avoiding excessive web content!… I hate hi-res stock photography!

Last week I had a twitter user make comment that implied the reason some of our recent thinwire enhancements have happened is because some of the HDX development and product management team are in the UK! Stefan made this comment


After seeing a fellow tweeter struggling to get a decent mobile signal in central London, supposedly one of the world’s most developed cities! Continue reading When less is more! Avoiding excessive web content!… I hate hi-res stock photography!

Great real user feedback on thinwire compatibility mode (thinwire plus)!

My colleague, Muhammad, blogged a few weeks ago about a new optimised graphics mode that seems to be delighting users with significant ICA protocol innovations, particularly those users with constrained bandwidth (read the details – here). During its development and various private and public tech previews this feature has been known as Project Snowball/Thinwire Plus/Thinwire+/Enhanced Compatibility mode but in the documentation it is now “Thinwire Compatibility Mode” (read the documentation – here).

I was delighted to read a detailed review by a Dutch consultant (Patrick Kaak) who has been using this at a real customer deployment. In particular it’s a good read because it contains really specific detailed information on the configuration and bandwidth levels achieved per session (<30kbps). Unfortunately (if you aren’t Dutch) it is written in Dutch so I had to pop it through google translate (which did an amazing job).

You can read the original article by Patrick here (if you know Dutch!): http://bitsofthoughts.com/2015/10/20/citrix-xenapp-thinwire-plus/

What I read and was delighted by is the google translated version below:

Since Windows 2012R2, Microsoft make more use of DirectX for the graphic design of the desktop, where they previously used GDI / GDI + API calls. This was evident at the ICA protocol, which was heavily optimized for GDI and triggering a higher bandwidth in Windows 2012R2.

1. without tuning halfway this year we were at one of our customers engaged in a deployment of XenApp 7.6 Windows 2012 R2. Unfortunately, this client had a number of low bandwidth locations. The narrowest lines were 256kbit and there were about seven session running over, which equates to approximately 35 kbit / s per session. We had the h264 (Super Codec) compression already disabled because it caused a lot of high bandwidth and a lot of optimization applied in the policies, but we did not get the line under the 150kbit / s. On average, we came out of around 170 kbit / s. The 35 kbit / s never seemed to be achievable.

After some phone calls with Citrix Project Snowball, we decided to embrace a project that focused on optimizing ThinWire within the ICA protocol and what we call since Feature Pack 3 now ThinWire Plus. This would again reduce the bandwidth to a level which previously Windows 2008R2 was feasible.

After installing the beta on the test servers turned out that we had to force the server to choose the compatibility mode. A moment of choice, because to do so we had to turn off the Super Codec in its entirety for the server for all users that are on there. This forces you to use each session to ThinWire, even where the lines have enough bandwidth and the Super Codec can be used. This is done by implementing the following registry key:

HKLM \ Software \ Citrix \ Graphics
Name: Encoder
Value: 0

It has furthermore been put to Medium in the policy Progressive Compression Level, as was indicated in the guidelines for ThinWire Plus.

snowball active – plus thin wire without optimizations: first results were superb. Immediately after installing ThinWire Plus dropped the average bandwidth already with 50% to 83 kbit / s.

After further tuning of all the components, it was even possible to still continue to go down. Previously had to some extreme measures for people on low bandwidth. The settings were made to further reduce the bandwidth. In the eye is the target frame rate that has been put to 15fps, and the use of 16 bit colors was carried out. Finally, a limitation per session bandwidth imposed maximum of 150 kbps.

gpoMaximum allowed color depth: 16 bits per level. (reduction of 10-15% of bandwidth only for entire server to switch)
Allow Visual Lossless Compression: Disabled
Audio over UDP: Disabled
Client audio redirection: Disabled
Client microphone redirection: Disabled
Desktop Composition Redirection: Disabled (prevents DCR is preferred over Enhanced ThinWire)
Desktop Wallpaper: Disabled (ensures uniform background color)
Extra color compression: Enabled (reduction of bandwidth, increased server CPU)
Additional color space threshold: 8192 kbs (default)
Heavyweight Compression: Enabled
Lossy Compression Level: High
Lossy compression threshold: 2147483647 Kbps (default)
Menu animation: Prohibited (reducing bandwidth by not using menu animations)
Minimum Image Quality: Low (always apply additional compression top sharper image)
Moving image compression: Enabled
Optimization for Windows Media redirection over WAN: Disabled (WMV prevents the WAN towards the client)
Overall Session bandwidth limit: 150 Kbps (for non-GMP, maximum bandwidth per session)
Progressive compression level: medium (required for enhanced thin wire)
Progressive compression threshold: 2147883647 Kbps (default)
Target frame rate: 15 fps
Target minimum frame rate: 10 fps (default)

3. snowball heavy tuned implementation of this policy came in the test situation, the average at 16 kbit / s. A value that we absolutely did not think we could get to in the beginning. In the user tests it was revealed that it still worked well on the environment, despite all the limitations that we had set in the policy.

After all changes were made in the production environment, we see that an average session now uses around 30 kbit / s. Slightly more than in the test environment, but certainly not values ​​that we complained about. Users can operate well and be happy.

Incidentally we discovered when testing behind it at a pass-through application (where users first connect to a published desktop and then launch a published application on another server), the ThinWire Plus configuration on both servers must be running. If we did not see we increase the bandwidth usage to the client again significantly.

(all my colleagues, thank you for providing the performance measurements!)