NOTE: I have made new blog-post containing useful info about RDP 8.x (i.e. Windows 8)
Since some time back around 2000 I’ve been running a dual desktop configuration at work. One screen for my laptop at work, and one screen with RDP home to a more powerful computer. Since I spend most of my time in front of a computer I usually invest a fair amount of money when buying a new computer, so my home computer is often the powerful one.
The problem is (for the most part) bandwidth. If it was over LAN then RDP would have no problem pushing a video, but over slower links you can notice each screen update. Currently I have a 26/4Mb line (waiting for a 100/100Mb) at home, so the screen of my home computer is being sent to me on a 4Mb link. That should be enough for casual use, but not full screen video. (The reason being that RDP is sending a lossless image and can’t real-time mpeg encode the picture because of CPU-power, latency in encoding and lossy encoding – so it has to use lossless compression that is easy on the CPU.)
A secondary problem is GPU hardware. Today most applications use hardware acceleration, but when you work via RDP a virtual (purely software) graphics driver is used to render your content. This worked for pre-Vista desktops, but it’s now few years since Windows switched from the obsolete memory rendering technique to a new hardware driven rendering and applications are starting to adapt. In short hardware accelerated rendering allows applications to render their content faster using less CPU.
A third and very noticeable and annoying problem is that RDP tries to send all the frames. If visit a web page with animated banners, list a whole lot of stuff in Putty or other things that update the screen a lot you have probably noticed that the RDP session hangs and that the best way to get it back is to minimize the window (because then it doesn’t send any data and the screen can finish updating).
RDP can be configured through group policy. The first and most straight forward setting to note is compression level. Default set to save memory. Setting this to save bandwidth will … hold on … save bandwidth!
Second is a new feature in Windows 7 SP1 and Windows 2008 R2 SP1 called RemoteFX. This even works on virtualized guest os running on HyperV. In short it allows RDP sessions to use hardware acceleration for rendering. It also changes the sampling method from “every update to the screen” to “interval update”. So if your screen updates a lot you will get only every x frame (as opposed to earlier where you had to wait until all the frames had been transferred). RemoteFX will use GPU for compressing the image being sent, making your computer (CPU) faster as well.
The difference explained in short: Going from seeing screen updates happen and window freezing to everything being smooth, responsive and even being able to (almost) watch a YouTube video smoothly.
Note: This required Windows 7 SP1 or Windows 2008 R2 SP1. But some settings can be tweaked for earlier versions, so it is still worth following the instructions as far as possible.
- Start: gpedit.msc
- Go to: Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment
- Configure RemoteFX: Enabled
This will enable GPU processing if your hardware supports it. GPU processing will speed up modern browsers, most apps, WPF apps, video, etc.
- Optimize visual experience when using RemoteFX: Enable and set both settings to “Medium” (or whatever suits you best). Feel free to experiment.
As opposed to earlier (default) settings where RDP tries to send every frame this allows RDP to skip frames to keep up and not freeze.
- Set compression algorithm for RDP data: Enabled and set algorithm to “Optimized to use less network bandwith”
- Optimize visual experience for Remote Desktop Services sessions: Enabled and set Visual experience to “Rich Multimedia.”
- Reboot and feel tha powah!
Small note: When I was first researching RemoteFX in SP1 beta I read that you had to enable RemoteFX on the client as well. I am uncertain if this is true as I do it anyway (since it also it RDP host sometimes), but I highly doubt it. Enabling it on the RDP host should be enough. However setting it on both only takes a few seconds, so …
If security is not a big concern you can disable encryption to speed things up. I haven’t tried this, but from what I read while researching RDP speed issues it should speed things up. Setting “Set client connection encryption level” under Security to “Low Level” should enable encryption for sending keys/mouse and disable encryption for receiving image.