Citrix

How to Optimize HDX MediaStream Server-Rendered Video

  • CTX124516
  • Created onMar 26, 2014
  • Updated onApr 18, 2014
Article Topic Configuration

Objective

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:

  1. Enable and configure Progressive Display.

  2. Adjust the maximum frame rate as appropriate.

  3. Optimize the audio experience.

  4. Allocate adequate CPU resources to the virtual desktop.

  5. Validate the configuration using the HDX Monitor.

Instructions

Step 1: Enable and Configure Progressive Display

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:

  1. 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.

    User-added image

  2. By applying this policy to a range of Client IP Addresses, you can ensure that this policy gets applied only to the remote users:

    User-added image

  3. (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:

    User-added image

Step 2: Adjust the Maximum Frame Rate as Appropriate

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

Step 3: Optimize the Audio Experience

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.

  1. To increase the Audio VC priority to Real-time:

    1. On the XenDesktop Delivery Controller, navigate to the following directory:

      C:\Program Files\Citrix\Desktop Delivery Controller

    2. Export the Delivery Controller settings to XML by running the following command:

      PortICASetDefaults /o <Directory>:\<FileName.xml>

    3. Open the XML file and change the priority of the Audio virtual channel (CTXCAM, “Client Audio Mapping”) from 1 to 0.

      User-added image

    4. Import the new Delivery Controller settings by running the following command:

      PortICASetDefaults /i <Directory>:\<FileName.xml>

      The following screen shot displays the sequence:

      User-added image

  2. Increase the Audio Service process priority:
    1. If you are using a Windows7 Virtual Desktop, change the Audio Service (CtxAudioService.exe) Priority to Above Normal by using Task Manager, as displayed in the following screen shot:

      User-added image

    2. If  you are using a Windows XP Virtual Desktop, change the Audio Service (CtxAudioService.exe) Priority to Above Normal by using Task Manager,  as displayed in the following screen shot:

      User-added image

See also: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/taskman_change_priority.mspx?mfr=true

Step 4: Allocate adequate CPU resources

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.

Step 5: Validate the configuration using the HDX Monitor

Citrix highly recommends using the HDX Monitor (available at https://taas.citrix.com/hdx/download/) to validate your HDX configuration.

Disclaimer

These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

Automatic translation

Important: This article was translated by an automatic translation system (also referred to as Machine Translation, or MT) and has not been translated or reviewed by people. Citrix offers a machine translated version of this article to allow for greater access to the support content. However, automatic translation is not always perfect and may contain errors of vocabulary, syntax or grammar. Citrix is not responsible for inconsistencies, errors or damage incurred as a result of the use of MT articles from our customers.Thank you.
Click here to see the English version of this article.
Languages
Was this helpful?
Thank you for your feedback

Share your comments or find out more about this topic

Citrix Forums