Over the last few weeks I’ve been working closely with Rachel Berry (Citrix) and Jason Southern (Nvidia) on some unexpected web browser behavior with web browsers on Nvidia grid enhanced VDI and RDS virtual machines running Citrix HDX 3D Pro. This work has resulted in a new support article from Citrix CTX202065.
In this article I’ll go a bit more in depth to explain our findings and hopefully help you to get better performance from web browsers but also give you some technical detail for situations where other applications may not perform as well as one would expect.
For this article we are using two virtual machines:
- Windows 8.1 x64, 4 vCPU, 8 GB Memory and an Nvidia vGPU K240Q profile
- Windows 2012 R2, 4vCPU, 20 GB Memory, and a passthrough Nvidia K2 GPU
- Citrix XenDesktop 7.6 HDX 3d Pro with all the public hotfixes
- Microsoft Internet Explorer 11
- Google Chrome 45
- Mozilla Firefox 40
- TechPower Z-GPU for measuring GPU usage
For benchmarking video performance and GPU offloading I’m using the IMAX Jerusalem trailer running 1080P on Youtube, this is a very resource intensive video!
To troubleshoot Chrome and Firefox behavior Jason pointed out that both browsers have build in GPU reports. For Mozilla Firefox open about:support in the address bar, for Google Chrome open chrome://gpu in the address bar.
In the screenshots below the default settings are shown for Windows 8.1
In the screenshots below the default settings are shown for Windows 2012 R2
Test with default settings
The picture below shows resource utilization of both CPU and GPU for the web browsers running within the virtual machines and connected via Citrix XenDesktop HDX 3D Pro.
Measurements are taken from Microsoft Windows Performance Monitor and Tech Power Z-GPU and are averages of visual readings. If you like a more scientific and in depth comparison between browsers visit this great article from Helge Klein.
This is what we’ll use as a baseline for the optimization tests.
Test with optimized settings
For these tests I’ve changed all the settings in the support article from Citrix CTX202065 and another article from fellow CTP Thomas Poppelgaard. On Windows 2012 R2 skip the gfx.direct2d.force-enabled=true as this will actually break Firefox!
For Chrome I used this article to force usage of the GPU.
The conclusion of this test is that, although I followed the support article and blogs, it doesn’t help change resource utilization. Looking at the CPU graphs the behavior seems to be a little less spiky but on average no noticeable changes.
Final test purely focussing on Firefox
In this article on the Mozilla Wiki pages, pointed out by Jason, some more aggressive changes are pointed out.
Open a Command Window and copy paste these set commands:
Now create a new shortcut for Mozilla Firefox
“C:\Program Files (x86)\Mozilla Firefox\firefox.exe” -p -no-remote
The picture below shows resource utilization of both CPU and GPU for just Mozilla Firefox running within the virtual machines and connected to via Citrix XenDesktop HDX 3D Pro.
Now this is what I call amazing!
My expectations for a Nvidia Grid K2 GPU enhanced virtual desktop running on either Windows 8.1 or Windows 2012 R2 were very high. When I started working with this setup I was very disappointed with browser multimedia performance to say the least. Other applications like the Nvidia Benchmarks or GLView seem to handle the multiple driver issue much better by just finding the best driver/card available.
So who’s fault is this? Microsoft, Citrix or Nvidia, I guess it’s neither of those and it all drills down to the application vendor. Consumer applications like Chrome and Firefox but even Microsoft Internet Explorer are apparently not smart enough to cope with situations where multiple video cards are available.
In the end it’s not just a web browser problem, other applications might just as well have these issues, although my hope is that graphical applications are a bit smarter in “finding” resources capable of rendering whatever it’s it needs to render.
A big thanks to both Rachel Berry and Jason Southern for their great support along the way!