This article explains how Citrix administrators can optimize XenDesktop HDX MediaStream Server-Rendered Video (including accompanying audio) to deliver a great user experience even over low bandwidth and high latency network connections. An optimized user experience for multimedia content includes a good balance between frame rate and image quality, audio-video synchronization, and the ability to do other desktop activities at the same time as watching a video. There are five key steps to achieving this:
Enable and configure Progressive Display.
Adjust the maximum frame rate as appropriate.
Optimize the audio experience.
Allocate adequate CPU resources to the virtual desktop.
Validate the configuration using the HDX Monitor.
User experience for video content depends upon the frame rate and image quality. The cinematic standard for frame rate is 24 frames per second (fps). This is XenDesktop’s default frame rate. XenDesktop will dynamically adjust the frame rate according to the network bandwidth available. To achieve the ideal balance between frame rate and image quality, it is important to enable and configure Progressive Display. This is especially important on low bandwidth connections. Progressive Display allows you to specify how much compression to apply to moving images such as video. Users do not want a “slide show” of pixel-perfect images when they are watching a video. By using lossy compression, you can greatly improve the frame rate and the overall user experience.
In general, Citrix recommends setting the Progressive Display image compression level to Medium Compression for users who are LAN-connected to the Citrix server and to High Compression for users who are WAN-connected.
Use the following steps to enable and configure Progressive Display:
In the Citrix Management Console, create an Image Acceleration Policy and enable Image acceleration using lossy compression.
Internal tests conducted at Citrix show that on a 1.5 Megabits per second bandwidth connection (equivalent to T1) at 300 milliseconds roundtrip latency, setting the Progressive Display compression level to High Compression delivered the best user experience by providing an optimal balance between frame rate and image quality.
By applying this policy to a range of Client IP Addresses, you can ensure that this policy gets applied only to the remote users:
(Optional) At 1 Megabits per second bandwidth and 300 millisecond latency, you might want to set the Progressive Display compression level to Very High Compression if the standard setting of High Compression is not providing a fast enough frame rate:
Many thin clients and other devices cannot keep up with the default 24 frames per second frame rate of XenDesktop. If the CPU on the device pegs near 100 percent when playing a server-rendered video, that is probably the reason. The solution is to reduce the maximum frame rate for these underpowered devices. For example, you might find that setting the maximum frame rate to 12 frames per second provides a better result.
On the other hand, there are also use cases where the highest possible frame rate is preferred, and the user device is sufficiently powerful. XenDesktop supports up to 30 frames per second for server-rendered video.
Instructions for adjusting the MaxFramesPerSecond registry key are found in CTX123543 - How to Improve XenDesktop Video User Experience for Low-Powered or Mobile Devices
To optimize the audio experience on XenDesktop 4, it is necessary to increase the Audio Virtual Channel priority to Real-time (priority 0), and to elevate the Audio Service process priority to Above Normal to ensure that it gets a proper CPU slice.
To increase the Audio VC priority to Real-time:
On the XenDesktop Delivery Controller, navigate to the following directory:
C:\Program Files\Citrix\Desktop Delivery Controller
Export the Delivery Controller settings to XML by running the following command:
PortICASetDefaults /o <Directory>:\<FileName.xml>
Open the XML file and change the priority of the Audio virtual channel (CTXCAM, “Client Audio Mapping”) from 1 to 0.
Import the new Delivery Controller settings by running the following command:
PortICASetDefaults /i <Directory>:\<FileName.xml>
The following screen shot displays the sequence:
Server-rendered multimedia delivery consumes considerable CPU on the server so it is generally recommended to disable Session Reliability (CGP service). If Session Reliability is required (such as for users on wireless connections), two virtual CPUs must be configured.
If the Virtual Desktop Agent is using a single virtual CPU and the Session Reliability feature is not required, then the Citrix CGP Service could also be disabled from the Windows Services to free up some more CPU for better performance.
Citrix highly recommends using the HDX Monitor (available at https://taas.citrix.com/hdx/download/) to validate your HDX configuration.