Table of Contents
Overview
This Post will list my findings during some Tests with AVD and vGPU, using native AVD (RDP) protocol and also with Citrix HDX on top.
The customer story behind that was Publish a customer owned Windows App (Actually it is based on Linux, but they built a Windows Client, too) to consumers, using AVD (Application backend servers already hosted on Azure) with GPU support, including the following requirements:
- Wrap it as a “SaaS App”, so UX / CI-Branding is important
- HTML5 Access only (Means there’s no UDP-Shortpath usage, only TCP)
- Scaling of different Display Resolutions (we don’t know what the consumer’s using)
Codecs & Settings
AVD native
Let’s start with some basics, what’s supported regarding GPU codecs with AVD.
GPU frame encoding:
RDP Protocol encodes all graphics rendered for transmission to the client, encoding is using Advanced Video Coding (AVC), also known as H.264
Full-screen video profile:
Higher frame rate and better user experience, but uses more network bandwidth between host and client. The Default is AVC/H.264 YUV 4:2:0. Increase to AVC/H.264 YUV 4:4:4 is possible (higher image quality)
- When there‘s a supported GPU on the clientside, it‘s switched to HEVC/H.265, which uses 25-50% less bandwidth at the same quality / bitrate
- H.265 is in preview on AVD and only supported with published Desktop and using the Rich-client for Windows (Windows App)
- Chroma falls back to YUV 4:2:0 with H.265
- HEVC Video Extensions on clientside has to be installed – 0,99 € on Microsoft Store, or included in CLEAN installs of Windows 11 22H2 or later
If you want to go deeper in all things codecs and graphics of RDP, checkout the latest (Version 60.0) 444-page MS-RDPBCGR sheet
AVD with HDX
So what’s supported when we put HDX on top of that? Pretty identical to AVD native (Irony ON), except some details.
- HEVC/H.265 is the default, for years. The Codec was released in 2013, 5 years later (2018) it got active support from Citrix
- H.265 YUV 4:4:4 supported
- Support for AV1 codec. The Codec was released in 2018, also 5 years later (2023) it got active support from Citrix
- NVIDIA Ada Lovelace (L4 / L40) or newer for both encoding and decoding
- Loss-tolerant mode (Great user experience with 10% packet-loss and high latency)
And of course, there are also tons of settings for finetuning, for example
- Thinwire, Thinwire+ (Thinwire with Selective H.264 / H.265)
- Video Codec for Actively Changing Regions / For the Entire Screen / Use When Preferred
- Optimize for 3D Graphics Workload / Hardware Encoding
- Build-to-Lossless / Always Lossless
- Visual Quality
- Target Frame Rate
- Color depth and Color compression
If you want to get a detailed view of NVIDIA’s supporting protocols on which Hardware (Encoding and Decoding) checkout the GPU Support-Matrix. it looks like this and contains all the important informations for your GPU project:
Settings on AVD for GPU Performance
As mentioned above, there aren’t that much settings to configure for enabling GPU support on your Workload.
The following settings will enable the NVIDIA GPU for usage, also hardware encoding and highen up the Chroma to YUV 4:4:4. You can set these via GPO or Intune:
If you want to use H.265, you have to import the latest AVD ADMX Templates – at the moment, the settings aren’t available in Intune:
Next, the default max Frames-Per-Second (FPS) rate is 30. If the vGPU published App / Desktop needs a higher rate, there‘s a Regkey to set the new maximum to 60 FPS:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations
Create DWORD (32-bit)
DWMFRAMEINTERVAL
Decimal = 15
Validate your Settings (Which Codec am I using?)
To check which Codec your current Session is using, you have to use Eventviewer. Go to Applications and Services Logs > Microsoft > Windows > RemoteDesktopServices-RdpCoreCDV > Operational to see which settings are active. Let’s see the different Events to compare.
Event 170 – NVIDIA as hardware encoder with H.264 is recognized and is able to use:
Event 162 – Initial Profile 2048 – H.264 is active:
Sadly, you can’t validate if the Chroma YUV 4:4:4 is active, you have to open a Azure support request. But to be honest, your eyes are able to see if 4:4:4 is active, see the example above with the Excel-Sheet with red and blue colors:
Event 162 – Initial Profile 32769 – H.265 is active:
Finally, with the latest Remote Desktop Client for Windows (1.2.5804) or the Windows App for Windows (2.0.317.0) you are now also able to check the used codec – example H.265 is active:
AVD vGPU SKU’s
Before choosing your preferred machine type, watch out the current limit „VM sizes with an NVIDIA GPU come with a GRID license that supports 25 concurrent users.“
NVv3-series (vGPU)
- NVIDIA Tesla M60 GPU with Intel Xeon CPU
- vCPU : RAM : vGPU Ratio is okay (it depends)
- Example NV12s_v3 with 12 vCPU, 112 GB RAM and 8 GB GPU
- Next size is 24 vCPU, 224 GB RAM and 16 GB GPU
NVv4-series (vGPU)
- AMD MI25 GPU
- AMD doesn‘t support AVC/H.264, not recommended to use AMD in that scenario
NVadsA10 v5-series (vGPU)
- NVIDIA Ampere A10 GPU with AMD EPYC CPU (base frequency 3.2 GHz, peak 4.0)
- vCPU : RAM : vGPU Ratio is okay (it depends)
- Example NV6ads_A10_v5 with 6 vCPU, 55 GB RAM and 4 GB GPU
- Next size is 12 vCPU, 110 GB RAM and 8 GB GPU
NC4as_T4 v3-series (GPU Passthrough)
- NVIDIA Tesla T4 GPU with AMD EPYC CPU (base frequency 2.45 GHz, peak 3.1)
- vCPU : RAM : GPU Ratio is okay, but limited to a single T4 Card
- Example NC4as_T4_v3 with 4 vCPU, 28 GB RAM and 16 GB GPU
- Next sizes having all the same GPU size
HTML5 Access AVD
One of the hardest customer requirements was to use HTML5 only. So let’s see where are the limits with AVD.
- Shared Tenant URL https://client.wvd.microsoft.com/arm/webclient/
- No customization
- No pre-config
- Only few settings for device redirection
- Own URL only with workaround of Azure Function App (not official supported)
- No way to prevent a User to use the Rich-Client which is Windows App (for all Platforms)
- Infopopup to use the preferred way of Windows App
First logon to the HTML5 Portal showing the popup:
Also I’ve noticed (because for that usecase I’m a great BYOD-Tester with my macOS) the default for Display Resolution is to NOT use the native one, which results in blurry pixels inside my session:
But after enabling the native Display Resolution, the image quality was near pixel perfect, no more blurriness, but a limited screensize of 1920×1080 – everything above is grey screen 🙂
Let’s checkout the running Build of the HTML5 Portal, Microsoft is using
Interesting, last Copyright is 2020 – what’s the current Build for RDWeb to download to use for OnPrem RDS? That’s 2.1.0.0 with a very detailed release note here – thanks Microsoft!
Just a sidetest – I’m getting the same Popup with the W365 CloudPC HTML5 Portal, which looks a bit more modern. But as my customer wants a high-user density, CloudPC isn’t an option.
HTML5 Access Citrix DaaS
Now, let’s connect Citrix DaaS and see what we can configure on top of AVD. It’s definitely a plus regarding customer branding and UX.
- customer.cloud.com or custom Domain (coolapp.customer.com)
- Pre-Logon Terms and Conditions
- Post-Logon Banner for planned Maintenance / Info for Helpdesk / Links
- Force HTML5 possible, so no need or popup to install Citrix Workspace App
- Activity Manager, Selfservice for Enduser when App / Session hangs
- Native Resolution Support (also with 5k on my Mac)
- Multi-Monitor
- Side-by-Side Appview
- Session Watermark
- Hardening Policies
Microsoft Ignite
But wait, there was MS-Ignite last week, so is that post here already out of date? What are all the new announcements for GPU?
That’s it. H.265 is now Generally Available for Windows365 CloudPC – NOT for AVD!
Linux Workload with GPU
So what about Linux? As I’ve mentioned, the initial customer App was developed and based on Linux. Do we need Windows to publish the app, anymore?
- Linux is supported on Azure in general, but not with AVD
- GPU Acceleration is possible, NVIDIA brings driver extensions for Linux
- It’s possible to use Citrix MCS to provision Linux Session Hosts and connecting through HDX Protocol
- HDX 3D Pro supports only VDI (Single-Session)
- For Multi-Session there‘s shared GPU acceleration for accelerate OpenGL 3D applications (Details here)
- Choose your Domainjoin possibilities
Test Results HTML5
AVD native
First, let’s start a AVD HTML5 session from my Mac, launched in MS-Edge and do some basic tests.
H.264 is working fine, the NVIDIA A10-4Q Profile is doing the job with encode and decode and my local MS-Edge process is also used by the Mac GPU.
Let’s start RDAnalyzer for some frame statistics:
It’s very important to know, RDP is a way more closed protocol, only giving limited counters to use for analyzing traffic. So the protocol itself says 30 fps are in use (Regkey to higher up to 60 fps is set), but what is NVIDIA saying? We are using 49 fps at the moment and when watching the YouTube Video, it’s definitely higher than 30 fps. That beeing said, the perfcounter showing the frames is limited to 30 – we have to trust in NVIDIA’s (Shouldn’t we – in general?) encoding statistics:
To double-validate that, I did a quick connect via the Windows App (no HTML5) and see what the Connection Information of the local Windows App displays VS RDAnalyzer inside my Session:
So Windows App and NVIDIA is saying 40 / 41 fps and RDP says 32 fps. NVIDIA is correct.
As this is a “hardcore” BYOD usecase, let’s test also a HTML5 session launched from a Tablet-Browser. I did a test with a AVD HTML5 Session, launched from Safari on my iPad.
- Popup: „The Browser isn‘t supported to use HTML5 for“
- Microsoft wants you to use the Windows App instead
- Technically, it was working, iPad Keyboard also
- Touch was working, but performance is laggy
With carvisualizer, I was able to hit 41 fps MAX on the HTML5 fullscreen session on iPad with Safari.
AVD with HDX
Also with HDX, let’s start first a simple HTML5 session in DaaS from my Mac with MS-Edge.
H.264 YUV 4:2:0 is used and first Tests showing 50 fps which was working completely smooth.
Thanks to Citrix Monitor, let’s see some Performance Counters when running carvisualizer for about 10 minutes. Here’s the topology, using GW-Service in Frankfurt, where my Azure VM is located, too.
I think these are some very great results for HTML5. In average, 52 fps while consuming 5,99 Mbit/s Bandwidth with 37 ms RTT.
Now let’s checkout a HTML5 session also launched from my iPad with Safari
- No Popup, fully supported
- Technically, it was working, iPad Keyboard also
- Touch was working fine
- Gesture control, Multi-Finger touch
- Scaling works fine, great performance
With carvisualizer, I was able to hit 55 fps MAX on the HTML5 HDX fullscreen session on iPad with Safari.
Measure the Data
To compare the protocols and the important Data-Measurements (FPS, Bandwidth Consumption, RTT) I’ve used RDAnalyzer in Logging-Mode to do the following Test and here are my results.
2x 5:30 Min 4k 60 FPS Video, HTML5 Session Fullscreen (Edge on macOS), YouTube in Cinema-Mode
AVD HTML5 (H.264) | HDX HTML5 (H.264) | |
Avg. FPS | 38,23 fps | 51,56 fps |
Avg. Bandwidth Consumption | 15,93 Mbit/s | 13,42 Mbit/s |
Avg. Round Trip Time (RTT) | 33,27 ms | 37,03 ms |
Total Bandwidth Usage | 9,02 GB | 7,41 GB |
Just to compare I did exactly the same, but now using the Richclient (Windows App for AVD and Citrix Workspace App for HDX) with H.265 Codec:
AVD H.265 | HDX H.265 | |
Avg. FPS | 48,57 fps | 52,58 fps |
Avg. Bandwidth Consumption | 16,44 Mbit/s | 13,89 Mbit/s |
Avg. Round Trip Time (RTT) | – | 41,34 ms |
Total Bandwidth Usage | 10,56 GB | 7,84 GB |
Sadly, RDAnalyzer has some problems with UDP-Shortpath to grab the Data. That’s why I was unable to calculate the RTT.
I would also love to do some tests with the AV1 Codec on HDX. I think I have to wait some years till the L4 / L40 GPU is available on Azure…
Summary / next Steps
At the moment, we’ve built a PoC containing three machines on Azure.
1x NC4as_T4_v3 with Windows 11 Multi-Session for testing native AVD with HTML5
1x NC4as_T4_v3 with Windows 11 Multi-Session for testing AVD with HDX with Citrix DaaS HTML5 (thanks to the VDA tokenbased registration, only using Rendezvous V2, no Cloud Connectors or Hosting Connections, just Internet)
1x NC4as_T4_v3 with Ubuntu Linux Multi-Session for testing HDX with Citrix DaaS HTML5 (also using VDA tokenbased registration)
Wrap up
After all these tests here’s my personal recommendation. (at the moment)
Choose AVD vGPU:
when there’s no general need for HTML5 – only for some fallbacks.
when > 40 fps is the requirement and you are able to use H.265 (Remember the current limits: Only for published Desktop, only for Windows Endpoints with HEVC Extension installed, in Tech Preview for AVD)
Choose AVD vGPU with HDX:
for everything else
… or use Dizzion Frame??? 🙂 (I’m not experienced with Frame, just seeing some very great results with vGPU and HTML5)
One comment