We were running several Windows 2012 R2 servers on a VMware ESX environment. And still, we experience a sluggish performance on the Windows 2012R2 server when connection them with any RDP-client. We tried different connections (wifi, 4G, LAN, etc.) and different clients (Windows 10 RDP, RoyalTS, Mac-RDP, etc.). The hardware could’t be a factor in the issue. So we searched to some finetune-settings in GPO and registry.

The hardware wasn’t an issue.

  • the servers did’t have a high overall load
  • there was no high CPU load
  • there was enough RAM
  • we used 15k HP SAS enterprise disks
  • there was no high IO
  • we had Teamed the NICs in VMware

 

This is what we did to solve the issue and get very fast RDP-performance.

 

  • Finetune “Remote Desktop Services” in Group Policy

 

Just wanted to post this for anyone else experiencing this issue.  Seems the issue does not effect Windows Server 2012 R2, and turns out it might be related to the UDP packets getting fragmenting when creating a RDP session.  Here’s the fix:

Computer Config > Windows Settings > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections > Select RDP transport protocol = Use only TCP

You can also set this on the client side by specifying:

Computer Config > Windows Settings > Admin Templates > Windows Components > Remote Desktop Services > Remote Desktop Connection Client > Turn off UDP on Client = Enabled

 

  • Disabling TCP Offloading in Windows Server 2012

We also add below registry setting to improve performance. A little explanation of TCP Offloading:

“TCP offload engine is a function used in network interface cards (NIC) to offload processing of the entire TCP/IP stack to the network controller. By moving some or all of the processing to dedicated hardware, a TCP offload engine frees the system’s main CPU for other tasks. However, TCP offloading has been known to cause some issues, and disabling it can help avoid these issues.”


 

This is what you must do in the Registry

1. Open RegEdit on the Windows Server machine.
2. Navigate to this registry key in the tree on the left:
3. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
4. Right-click on the right side, and add a new DWORD (32-bit) Value
5. Set the value name to DisableTaskOffload and the value data to 1
6. Reconnect to the Server via RDP (to a new session) and your performance should be normal.