Thinwire
Introduction
Thinwire, a part of Citrix HDX technology, is the Citrix default display remoting technology used in Citrix Virtual Apps and Desktops.
Display remoting technology allows graphics generated on one machine to be transmitted, typically across a network, to another machine for display.
A successful display remoting solution provides a highly interactive user experience that is similar to that of a local PC. Thinwire achieves this experience by using a range of complex and efficient image analysis and compression techniques. Thinwire maximizes server scalability and consumes less bandwidth than other display remoting technologies.
Because of this balance, Thinwire meets most general business use cases and is used as the default display remoting technology in Citrix Virtual Apps and Desktops.
HDX 3D Pro
In its default configuration, Thinwire can deliver 3D or highly interactive graphics and use a graphics processing unit (GPU), if present. However, we recommend enabling HDX 3D Pro mode using theOptimize for 3D graphics workloadorVisual quality > Build to losslesspolicies for scenarios when GPUs are present. These policies configure Thinwire to use a video codec (H.264 or H.265) to encode the entire screen using hardware acceleration if a GPU is present. Doing so provides a more fluid experience for 3D professional graphics. For more information, seeH.264 Build to lossless,HDX 3D Pro, andGPU acceleration for Windows Single-session OS.
Requirements
Thinwire is optimized for modern operating systems, including Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, and Windows 10. For Windows Server 2008 R2, legacy graphics mode is recommended. Use the built-inCitrix policy templates, High Server Scalability-Legacy OS and Optimized for WAN-Legacy OS to deliver the Citrix recommended combinations of policy settings for these use cases.
Note:
We do not support legacy graphics mode in this release. It is included for backward compatibility when using XenApp 7.15 LTSR, XenDesktop 7.15 LTSR, and previous VDA releases.
- The policy setting which drives the behavior of Thinwire,Use video codec for compression, is available on VDA versions in Citrix Virtual Apps and Desktops 7 1808 or later and XenApp and XenDesktop 7.6 FP3 and later. TheUse video codec when preferredoption is the default setting on VDA versions Citrix Virtual Apps and Desktops 7 1808 or later and XenApp and XenDesktop 7.9 and later.
- All Citrix Workspace apps support Thinwire. Some Citrix Workspace apps might support features of Thinwire that others do not, for example, 8-bit or 16-bit graphics for reduced bandwidth usage. Support for such features is automatically negotiated by Citrix Workspace app.
- Thinwire uses more server resources (CPU, memory) in multi-monitor and high-resolution scenarios. It is possible to tune the amount of resources Thinwire uses, however, bandwidth usage might increase as a result.
- In low bandwidth or high latency scenarios, consider enabling 8-bit or 16-bit graphics to improve interactivity. Visual quality might be affected, especially at 8-bit color depth.
Encoding methods
Thinwire can operate in two different encoding modes depending on policy and client capabilities:
- Thinwire full screen H.264 or H.265
- Thinwire with selective H.264 or H.265
Legacy GDI remoting uses the XPDM remoting driver and not a Thinwire bitmap encoder.
Configuration
Thinwire is the default display remoting technology.
The following Graphics policy setting sets the default and provides alternatives for different use cases:
- Use video codec for compression
- Use video codec when preferred. This is the default setting. No additional configuration is required. Keeping this setting as the default ensures that Thinwire is selected for all Citrix connections, and is optimized for scalability, bandwidth, and superior image quality for typical desktop workloads. This is functionally equivalent toFor actively changing regions.
- Other options in this policy setting continue to use Thinwire with other technologies for different use cases. For example:
- For actively changing regions. The adaptive display technology in Thinwire identifies moving images (video, 3D in motion) and uses H.264 or H.265 only in the part of the screen where the image is moving.
- For the entire screen. Delivers Thinwire with full-screen H.264 or H.265 to optimize for improved user experience and bandwidth in cases with heavy use of 3D graphics. In the case of H.264 4:2:0 (theVisually losslesspolicy is disabled), the final image is not pixel perfect (lossless) and might not be suitable for certain scenarios. In such cases, consider usingH.264 Build to losslessinstead.
Various other policy settings, including the following Visual display policy settings can be used to fine tune the performance of display remoting technology. Thinwire supports them all.
To get the Citrix recommended combinations of policy settings for different business use cases, use the built-inCitrix Policy templates. TheHigh Server ScalabilityandVery High Definition User Experiencetemplates both use Thinwire with the optimum combinations of policy settings for your organization’s priorities and your users’ expectations.
Monitoring Thinwire
You can monitor the use and performance of Thinwire from Citrix Director. The HDX virtual channel details view contains useful information for troubleshooting and monitoring Thinwire in any session. To view Thinwire-related metrics:
In Director, search for a user, machine or endpoint, open an active session and clickDetails. Or, you can selectFilters > Session > All Sessions, open an active session and clickDetails.
Scroll down to theHDXpanel.
SelectGraphics - Thinwire.
Lossless compression codec (MDRLE)
在一个典型的桌面会话,大部分的图像is simple graphics or text regions. Thinwire determines where these regions are and selects these areas for lossless encoding using the 2DRLE codec. At the Citrix Workspace app client side, these elements are decoded using the Citrix Workspace app-side 2DRLE decoder for session display.
In XenApp and XenDesktop 7.17, we added a higher compression ratio MDRLE codec that consumes less bandwidth in typical desktop sessions than the 2DRLE codec. This new codec does not impact server scalability.
Lower bandwidth usually means improved session interactivity (especially on shared or constrained links) and reduced costs. For example, the expected bandwidth consumption when using the MDRLE codec is approximately 10–15% less compared with XenApp and XenDesktop 7.15 LTSR for typical Office-like workloads.
Configuration isn’t required for the MDRLE codec. If Citrix Workspace app supports MDRLE decoding, the VDA uses the VDA MDRLE encoding and the Citrix Workspace app MDRLE decoding. If Citrix Workspace app doesn’t support MDRLE decoding, the VDA automatically falls back to 2DRLE encoding.
MDRLE Requirements:
- Citrix Virtual Apps and Desktops minimum version 7 1808 VDAs
- XenApp and XenDesktop minimum version 7.17 VDAs
- Citrix Workspace app for Windows minimum version 1808
- Citrix Receiver for Windows minimum version 4.11
Progressive Mode
Citrix Virtual Apps and Desktops 1808 introduced progressive mode and enabled it by default. In constrained network conditions (default: bandwidth < 2 Mbps, or latency > 200 ms), Thinwire increased the compression of text and static imagery to improve interactivity during screen activity. The heavily compressed text and images are then progressively sharpened, in a random block fashion, when screen activity stopped. While compressing and sharpening this way improves overall interactivity, it reduces cache efficiency and increases bandwidth usage.
As of Citrix Virtual Apps and Desktops 1906, progressive mode is disabled by default. We now use a different approach. The quality of still images is now based on network conditions and floats between a pre-defined minimum and maximum value for eachVisual qualitysetting. Because there is no explicit sharpening step, Thinwire optimizes image delivery and maintains cache efficiency, while providing nearly all of the benefits of progressive mode.
Changing progressive mode behavior
You can change the progressive mode state with the registry key. For information, seeProgressive modein the list of features managed through the registry.
H.264 Build to lossless
Build to losslessis a special Thinwire configuration that optimizes graphics delivery for interactivity and final image quality. You can enable this setting by setting theVisual qualitypolicy toBuild to lossless.
Build to lossless compresses the screen using H.264 (or H.265) during screen activity and sharpens to pixel perfect (lossless) when activity stops. The H.264 (or H.265) image quality adapts to available resources to maintain the best possible frame rate. The sharpening step is performed gradually, giving an immediate response if the user begins screen activity shortly after sharpening starts. For example, selecting a model and rotating it.
H.264Build to losslessoffers all the advantages of full screen H.264 or H.265, including hardware acceleration, but with the added benefit of a final, guaranteed lossless screen. This is critical for 3D-type workloads that require a final pixel-perfect image. For example, manipulating medical imagery. Also, H.264Build to losslessuses fewer resources than full screen H.264 4:4:4. As a result, usingBuild to losslessusually results in a higher frame rate than Visually lossless H.264 4:4:4.
Note:
In addition to theVisual qualitypolicy, set theUse video codecpolicy toUse when preferred(default) orFor actively changing regions. You can revert to non-H.264 Build to lossless by setting theUse video codecpolicy toDo not use video codec. This results in moving images being encoded with JPEG instead of H.264 (or H.265).