Quite a few comments on my earlier blogs have revealed some users struggling to configure Autodesk and similar applications particularly for XenApp GPU sharing, which when configured properly we’ve seen supporting 20 AutoCAD users on a single GPU, and is proving great for cost effective GPU sharing for applications such as Dassault 3DVIA Composer Player and SolidWorks, Adobe PhotoShop and GPU accelerated office apps such as Excel. XenApp sharing supports multiple vendors (including AMD and NVIDIA) GPUs via GPU pass-through support on XenServer, vDGA on vSphere or on phyiscal XenApp servers (bare metal).
There are quite a few known configuration tricks and tips for Autodesk applications and similar:
- Many Autodesk application require you to turn “hardware acceleration” on explicitly. Note: Turning hardware acceleration off can be useful for investigations
- Autodesk and other CAD/Graphical applications can be CPU intensive depending on users’ workflows and GPU usage may be lower than you have assumed. So you should check the CPU and GPU usage, there are some tools to help you do this listed on my earlier blog: /blogs/2013/12/16/configuring-xenserver-to-use-turbo-mode-including-for-3-d-graphically-intense-applications/
- Autodesk themselves have issued some configuration advice that can enable enhanced performance for their applications, http://help.autodesk.com/view/RVT/2014/ENU/?guid=GUID-91215204-4148-4591-84BD-1A695B8F5D98
For many Autodesk applications you need to actively enable the use of hardware acceleration, there are some comments on my blog to help you do this, here; I’d also recommend the OpenBoundaries setup video: http://openboundaries.co.uk/poc.html for AutoDesk Inventor and Revit, detailed on this blog.
Checking your VM is using the best graphics adaptor
In your device manager (see Figure 1) there will probably be multiple display adapters, e.g.:
- Ones for the GPUs available e.g. NVIDIA GRID K2 or NVIDIA Quadro 4000 (as on the screenshot on this blog)
- Standard VGA Graphics Adapter
The Standard VGA Graphics Adapter is the native VM display adapter which will appear disabled in Windows 7 i.e. A yellow bang against the “Standard VGA graphics Adapter” with the device status “Windows has stopped this device because it has reported problems. (Code 43)” is expected behavior on versions of Windows prior to Windows 8. This behavior is purely cosmetic and will not affect the availability or functionality of the physical GPU. The reason for this is that A new Display model was introduced with Windows Vista called Windows Display Driver Model (WDDM), the old model was called Window XP Display Model (XPDM).
The emulated (native) graphics adapter is a Cirius Logic device, this only has XPDM drivers. All real GPU devices (AMD and NVIDIA) use the newer WDDM driver model for their drivers. Windows is unable to support both WDDM and XPDM at the same time and prefers load the newer WDDM display model if a conflict occurs. This results in the graphics’ driver for the emulated Cirius Logic device being unable to load and the Yellow Bang being displayed against the emulated device. This “error” is usually benign however you believe otherwise and do not have the WDDM driver installed, you can contact the vendor (Microsoft) for a WDDM driver for their adapter. (Note: that MS provide a WDDM driver for that adapter on Win8 but not on Win7.
You can verify which adaptor is being used by: Opening the Screen Resolution screen (right click on the desktop) and look and advanced settings, see Figure 2, you should see the pass-through or vGPU listed (if using NVIDIA GRID vGPU), in this case an NVIDIA Quadro 4000.
NOTE: GPU-z or other tools might display the GPU even when it is not being used.
XenApp GPU Sharing On Windows Server 2012:
Remote Desktop Services (RDS) sessions on the RD Session Host server by default use the Microsoft Basic Render Driver and therefore do not use the GPU. This prevents 2D DirectX applications (such as MS office apps) from using GPU resources for rendering which can sometimes be more efficiently performed in software. To run 3D applications that use DirectX in RDS sessions, it is recommended that they are run on a dedicated server where 2D apps are not likely to compete for GPU resources. For this server, the default behaviour should be changed to use the GPU in RDS sessions by enabling the enable the “Use the hardware default graphics adapter for all Remote Desktop Services sessions” setting via group policy.
Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment.
Note: There are some comments on this MS blog that fill in some details.
On both Windows Server 2008 R2 and Windows Server 2012:
To enable WPF applications (such as Autodesks’) to render using the server’s GPU, create in the registry of the server running Windows Server OS sessions the following settings:
◦[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\CtxHook\AppInit_Dlls\ Multiple Monitor Hook] ” EnableWPFHook” =dword:00000001
◦[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\CtxHook\AppInit_Dlls\ Multiple Monitor Hook] ” EnableWPFHook” =dword:00000001
Check DirectX is being used
Applications such as Autodesk Inventor use DirectX. To check this is working or diagnose problems you can use the DirectX Diagnostic Tool (dxdiag).
GPU acceleration for CUDA or OpenCL applications
XenApp also provides experimental support for GPU acceleration (see /blogs/2014/04/23/opencl-and-nvidia-cuda-support-for-citrix-xenserver-xendesktop-and-xenapp/) of CUDA and OpenCL applications running in a user session. This support is disabled by default, but you can enable it for testing and evaluation purposes.
1. To use the experimental CUDA acceleration features, enable the following Registry settings:
◦[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\CtxHook\AppInit_Dlls\Graphics Helper] ” CUDA” =dword:00000001 ◦[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\CtxHook\AppInit_Dlls\Graphics Helper] ” CUDA” =dword:00000001
2. To use the experimental OpenCL acceleration features, enable the following Registry settings:
◦[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\CtxHook\AppInit_Dlls\Graphics Helper] ” OpenCL” =dword:00000001 ◦[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\CtxHook\AppInit_Dlls\Graphics Helper] ” OpenCL” =dword:00000001
Checking the use of OpenGL applications
Third party tools (these should be assessed at your own discretion and my personal usage is not an official Citrix endorsement or certification) exist which can help benchmark and analyse OpenGL usage by applications. GLView for example includes rendering tests.
Don’t forget Windows Task Manager
Yes that most fundamental of tools can often tell you what is busiest and actually being used. The process and application names are often very intuitively named and if you use a graphically intensive workload you can learn a lot watching the process priorities and usage change. The CPU usage on the performance tab is a great sanity check within a VM that you have configured your vCPUs and cores per socket correctly as per this advice.