I recently spent some time experimenting with GPU Discrete Device Assignment in Azure using the NV* series of VM. As we noticed that Internet Explorer was consuming quite a bit CPU resources on our Remote Desktop Services session hosts, I wondered how much of an impact on the CPU using a GPU would do by accelerating graphics through the specialized hardware. We did experiments with Windows Server 2012 R2 and Windows Server 2016. While Windows Server 2012 R2 does deliver some level of hardware acceleration for graphics, Windows Server 2016 did provide a more complete experience through better support for GPUs in an RDP session.
In order to enable hardware acceleration for RDP, you must do the following in your Azure NV* series VM:
- Download and install the latest driver recommended by Microsoft/NVidia from here
- Enable the Group Policy Setting Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Remote Session Environment\Use the hardware default graphics adapter for all Remote Desktop Services sessions as shown below:
To validate the acceleration, I used a couple of tools to generate and measure the GPU load. For load generation I used the following:
- Island demo from Nvidia which is available for download here.
- Microsoft Fish Tank page which leverages WebGL in the browser which is in turn accelerated by the GPU when possible
- This proved to be the scenario that differentiated Windows Server 2016 from Windows Server 2012 R2. Only under Windows Server 2016 could high frame rate and low CPU utilization was achieved. When this demo runs using only the software renderer, I observed CPU utilization close to 100% on a fairly beefy NV6 VM that has 6 cores and that just by running a single instance of that test.
- Here’s what FishGL looks like:
To measure the GPU utilization, I ended up using the following tools:
- Microsoft Sysinternals Process Explorer
- The tool does a good job at giving you an high level idea of the GPU cores utilization
- Windows Performance Recorder and Windows Performance Analyzer which is part of the Windows Assessment and Deployment Toolkit (WIndows ADK).
In order to do a capture with Windows Performance Recorder, make sure that GPU activity is selected under the profiles to be recorded:
Here’s a recorded trace of the GPU utilization from the Azure VM while running FishGL in Internet Explorer that’s being visualized in Windows Performance Analyzer:
As you can see in the WPA screenshot above, quite a few processes can take advantage of the GPU acceleration.
Here’s what it looks like in Process Explorer when you’re doing live monitoring. As you can see below, you can see which process is consuming GPU resources. In this particular screenshot, you can see what Internet Explorer consumes while running FishGL my workstation.
Windows Server 2016 takes great advantage of an assigned GPU to offload compute intensive rendering tasks. Hopefully this article helped you get things started!