09 Jul
LATEST FROM CITRIX - HDX GRAPHICS PERFORMANCE COUNTERS

There are multiple methods to gain insights and information about a Citrix session, especially concerning HDX graphics. Citrix offers tools such as the Graphics Status Indicator, HDX Monitor, and Citrix Director and Analytics for monitoring, troubleshooting, and resolving issues related to HDX graphics.  Performance metrics and statistics pertinent to HDX are accessible through Performance Counters and can be viewed in the Windows Performance Monitor. This blog will delve into the newly added Performance Counters in Citrix's product and demonstrate how these counters can be utilized to address two prevalent issues.

Graphics status indicator

The graphics status indicator provides in-session information. This tool provides end users with information on the active graphics mode in use. It includes details on the video codec, hardware encoding, image quality, and the monitors utilized during the session. Additionally, the graphics status indicator enables end users to toggle pixel-perfect mode, allowing them to optimize the balance between image quality and interactivity.

HDX Monitor

The HDX Monitor tool validates the functioning and setup of essential HDX features, such as Thinwire graphics. It is primarily designed for monitoring and diagnostics, offering a more comprehensive view of the session than the Graphics Status Indicator. Additionally, the HDX Monitor provides tabs to examine the WMI output available for HDX, gathering data from pre-existing Windows WMI objects and Citrix-specific WMI providers that are installed with the VDA.

WMI Objects (Windows Management Instruments)

Information within WMI Objects can be directly queried. Citrix exposes its Windows Management Instrumentation (WMI) information under the Citrix namespace Root\citrix. Details about HDX can be found under root\citrix\HDX.

  • To query the WMI Objects WMIC can be used as well as PowerShell.
  • To view a list of available objects and classes, open Powershell and execute the following CmdLet:
    • Get-WmiObject -Namespace root/citrix/hdx -Query “SELECT * FROM Citrix_VirtualChannel_Thinwire_Base”

Citrix Analytics

The Citrix Analytics platform offers a detailed analysis of session performance and user experience. It leverages User Experience Analytics to assess user sessions with key performance indicators, including Session Logon Duration, Session Responsiveness, Session Availability, and Session Resiliency. For example, it measures Session Responsiveness by evaluating in-session responsiveness and session latency.

Performance counters

In the CVAD 2308 update, the HDX Graphics suite has seen a substantial increase in the number of performance counters, specifically tailored for graphics encoding and located within the "ICA Graphics" section. These counters are distinct from those in the "ICA Session," which pertain to the remaining elements of the protocol stack and the transport layer. The table below enumerates the "ICA Graphics" counters that are available. Unless indicated otherwise, each counter refreshes at 10-second intervals.

BitRate – CurrentAn estimation of the currently available bandwidth, measured in bits per second.
ByteCount – Base Graphics ModeThe cumulative number of bytes generated by the default Thinwire encoder.
ByteCount – Full screen Video CodecThe cumulative number of bytes generated by the full-screen video encoder (H.264, H.265 or AV1).
ByteCount – Full screen Video Codec LosslessThe cumulative number of bytes generated by the full-screen video lossless (optimized) encoder.
Encode Time – Full screen Video CodecThe time taken, in milliseconds, to encode the last frame.
Frame rate – Current FPSCurrently encoded/output FPS (capped by Target FPS policy setting)
Frame rate – Encoder Frames droppedA count of the number of frames the encoder dropped after being considered for encoding.
Frame rate – Input FPSThe frame rate (application render rate) as seen by the encoder.
Frame rate – Target FPSCurrent target FPS, mainly driven by the corresponding policy setting. The graphics encoder will aim to deliver frames at a rate up to this value.
Frames sent – Base graphics countA count of the number of frames sent to the client. 
Frames sent – Special optimized CountA count of the number of lossless frames sent to the client (Only used in full-screen video encoding mode)
Frames sent –  Cursor update countA count of the number of times a mouse cursor update has been sent to the client.
Frames sent –  Overall CountA count of the total number of frames, including mouse cursor updates and small frames (full-screen encoding only), sent to the client.
Thinwire Active Transient RegionsNumber of detected distinct video regions.
Thinwire Active Video contextsNumber of H.264, H.265 or AV1 video contexts currently in use. 
Thinwire Average Input FPSThe frame rate (application render rate) as seen by the Thinwire encoder. For example, an application may render at 60 fps.
Thinwire Average Output FPSThe frame rate at which Thinwire is producing encoded frames. 
Thinwire Bandwidth Estimate (bps)An average bandwidth estimate based on the last 5 seconds of activity.
Thinwire Glyph Cache EfficiencyA percentage (0-100%) of how well glyphs are being detected & re-used.
Thinwire Glyph Cache SizeThe size (in bytes) of the glyph cache.
Thinwire Glyph Cache usageThe size (in bytes) of how much of the glyph cache is currently in use. 
Thinwire Glyph Detection ActiveA boolean value (0 or 1) indicating whether glyph detection is currently active.
Thinwire JPEG Image QualityThe current JPEG quality (0-100) used for static imagery.
Thinwire Latency estimate (ms)An average network latency estimate based on the last 5 seconds of activity.
Thinwire Memory Cache EfficiencyA percentage value (0-100%) indicating how well the Thinwire cache is being utilized.
Thinwire Memory Cache SizeThe size (in bytes) of Thinwire’s image memory cache.
Thinwire Memory Cache UsageThe size (in bytes) of how much of the image memory cache is in use.
Thinwire RTTA roundtrip time estimate computed by Thinwire.
Thinwire Screen Copy EfficiencyA percentage value (0-100%) indicating Thinwire codec efficiency
Thinwire Session Degradation FactorCombines current bandwidth and latency estimates to form a decimal value between 0 and 1 indicating the health of the current network conditions, with 0 meaning poor and 1 being adequate.

Performance counters are accessible through PerfMon, which is primarily used for monitoring real-time statistics. Initially, PerfMon displays only the %Processor Time counter. To view more, add additional counters by clicking the green plus sign. For HDX graphics metrics, you can find these counters under the 'ICA Graphics' category.

Counters added are instantly reflected in the real-time statistics overview.

Windows Performance Monitor not only displays real-time statistics but also captures performance data over time by creating Data Collector Sets.

Data Collector Sets can leverage all available counters to monitor system performance. These sets are customizable with specific counters and alerts to fit unique monitoring needs. When configuring custom Data Collector Sets, you can specify the sampling interval and select where the data should be stored. Additionally, data collection can be triggered manually or set to run automatically at specified times or intervals.

Citrix has completed the acquisition of Vast Limits GmbH, the company that developed uberAgent. This integration allows for Citrix performance counters to be seamlessly incorporated into uberAgent.

For further details on querying performance counters in uberAgent, refer to the practice guide.

Use cases

Performance counters allow you to monitor metrics such as the frame rate and average frame rates of an active Citrix Session.

The ICA graphics counters specifically target the encoding aspect of HDX. These metrics can be integrated with those from the ICA Session counters to identify correlations or troubleshoot issues.

For a metric or counter to be valuable, it must provide answers that aid in achieving an objective, such as diagnosing or resolving issues, or offering insights into session performance. To demonstrate, consider two scenarios where ICA Graphics performance counters can be effectively utilized.

In the example below, we will add the frame rate and average frame rate performance counter. 

Video - Introducing new HDX graphics performance counters -click here

In this scenario, Citrix has incorporated a frame rate counter. When the screen is static, the frame rate drops to a few frames per second (FPS). However, moving the Performance Monitor window increases the frame rate due to screen updates. 

Playing a 60 FPS video on YouTube prompts Thinwire to adjust the output to 60 FPS, which reverts to 30 FPS when switching back to the default video setting. 

By analyzing both input and output FPS metrics, one can identify performance issues. 

The goal is to align the output FPS with the input FPS. The input FPS metric indicates the frame rate received by our encoding engine from Windows. A significant difference between the input and output FPS may indicate a performance bottleneck within the Virtual Delivery Agent (VDA).

Video - Introducing new HDX performance counters - click here

Monitoring static image quality is possible through the 'Thinwire JPEG Image Quality' counter, which provides a real-time value for the image quality. The Graphic Status Indicator allows us to adjust the static image quality. Changing the setting from the default 'let the system decide' to a manual option will result in a corresponding real-time adjustment in the 'Thinwire JPEG Image Quality'. Reducing the quality to the lowest setting will lead to significant visual degradation.

Additional Resources:

Product documentation: Citrix Virtual Apps and Desktops

Techzone: HDX Graphics Overview - Design Decision: HDX Graphics Overview | Citrix Tech Zone


Comments
* The email will not be published on the website.