Optimizing Autocad cursor lag on XenDesktop

One of the problems with Autocad on XenDesktop and XenApp is that it has a special cursor (crosshair) that needs to run remote, therefore causes a lag in the user experience even on the LAN (~1ms network)

I wanted to see if it was possible to optimize this, because users were complaining about this. I came over some articles that shows how to increase how often the mouse location is sent over the wire.



Basically you set the reg key on your client computer to a lower value, default is 10. Note that this will increase bandwidth usage, but I’m in a LAN scenario so that is not an issue. I tried with 1.

Next, the article also mentions increasing Max FPS in citrix HDX policy, I increased it from 30 to 60 FPS.

The user experience was MUCH better; the mouse cursor lag was almost un noticeable. But I wanted to document exactly how much it did helps. So, how to measure end to end latency for mouse movements? I came up with a very simple solution, using the iphone slowmotion function at 240 FPS to record the screen and the mouse in one view. Then by counting how many frames it takes from my hand moves to the cursor moves I could calculate the latency with a precision of 4ms (1000/240), event better, with Quicktime I could just use the timecode to see how long it took from start mouse move to start cursor move. Look at this video from before and after optimizations.

I also tried one more thing, Enabling Citrix Receiver Hardware decode, that is using GPU to decode H.264. Many think of this as a way to save CPU un the endpoint, but more important is to reduce latency, because GPU does parallel processing, it decodes faster.

The result was impressive. Up to 40% reduction in end to end latency on LAN network. Here is my data:

The 3D object shows how long time it takes from mouse moves to a 3d object rotates. This has more overhead than just the remote cursor because it has to process the 3d object end encode more H.264 data.

Next is to try how much more latency we can reduce with GPU encode of H.264 data, using Nvidia NVENC. Need to wait for a public release of this.

2 thoughts on “Optimizing Autocad cursor lag on XenDesktop

  1. Thanks for the insights. But could you please add more details on your test configuration? Which Citrix policies did you use apart from 60fps? Visual Quality? What about lossless? Most of the customers use lossless in LAN scenario.

    • Target framerate=60fps, Use video codec for compression, visual quality Medium. Memory limit 131072. Nvidia Grid K240Q. 4×2,6Ghz CPU and 8GB Ram. Windows 10 and XenDesktop 7.9. Receiver 4.4

Leave a Reply

Your email address will not be published. Required fields are marked *