Optimizing RDP for casual use (Windows 7 SP1, RemoteFX) | Tedds blog

Windows 7 RDP Server

Windows / February 11, 2018

Remote Desktop iconRemote Desktop 6.0, the latest version of Microsoft Remote Desktop client, which comes pre-installed with Vista was slower than molasses when I tried connecting to some Windows 2003 servers. In particular, I was trying to manage a Windows 2003 R2 64-bit Server running Exchange 2007 with 4GB of RAM and a fast 1.83Ghz dual-core processor. I'd click on something and wait and wait for my click to register. Moving a Window would also be painfully slow. It didn't seem related to network connectivity since the screen redraw was fairly fast, but it just took a long time for the server to respond to keystrokes, mouse-clicks, etc. It had all the earmarks of a server's CPU being overwhelmed.

But surely, this brand-spankin' new server will all this horsepower couldn't possibly be overloaded unless it had spyware or a virus. That wasn't likely either since I'm pretty diligent about protecting my servers. I logged on locally to the server and the server's performance was normal. Thus, only when I used Remote Desktop was it slow. Further, when I tried Remote Desktop from a Windows XP Professional PC, the server was also fast. It was only when I used Remote Desktop from my brand new Windows Vista Ultimate Edition PC that the performance was terrible. It was very odd, because from my Vista PC I could connect to many other machines with no problems. I was aware that Vista comes with a new RDP (Remote Desktop Protocol) client called Remote Desktop 6.0, which has more security and networking features, so perhaps there was some sort of network security conflict.

After doing some more research I discovered that Remote Desktop 6.0 leverages a new feature called auto-tuning for the TCP/IP receive window that could be causing the trouble. What is auto-tuning for the TCP/IP receive window? Well, the new Microsoft TCP/IP stack supports Receive Window Auto-Tuning. Receive Window Auto-Tuning continually determines the optimal receive window size by measuring the bandwidth-delay product and the application retrieve rate, and adjusts the maximum receive window size based on changing network conditions.
In Vista, Receive Window Auto-Tuning enables TCP window scaling by default, allowing up to a 16 MB window size. As the data flows over the connection, the TCP/IP stack monitors the connection, measures the current bandwidth-delay product for the connection and the application receive rate, and adjusts the receive window size to optimize throughput. The new TCP/IP stack no longer uses the TCPWindowSize registry values which many third-party utilities used to "tweak".

Receive Window Auto-Tuning has a number of benefits. It automatically determines the optimal receive window size on a per-connection basis. In Windows XP, the TCPWindowSize registry value applies to all connections. Applications no longer need to specify TCP window sizes through Windows Sockets options. And IT administrators no longer need to manually configure a TCP receive window size for specific computers.

According to Microsoft, with Receive Window Auto-Tuning, a Windows Vista-based TCP peer will typically advertise much larger receive window sizes than a Windows XP-based TCP peer. This allows the other TCP peer to fill the pipe to the Windows Vista-based TCP peer by sending more TCP data segments without having to wait for an ACK (subject to TCP congestion control). For typical client-based networking traffic such as Web pages or e-mail, the Web server or e-mail server will be able to send more TCP data more quickly to the client computer, resulting in an overall increase in network performance. The higher the BDP and application retrieve rate for the connection, the better the performance increase.

The impact on the network is that a stream of TCP data packets that would normally be sent out at a lower, measured pace, are sent much faster resulting in a larger spike of network utilization during the data transfer. For Windows XP and Windows Vista-based computers performing the same data transfer over a long, fat pipe, the same amount of data is transferred. However, the data transfer for the Windows Vista-based client computer is faster due to the larger receive window size and the server's ability to fill the pipe from the server to the client.

Source: blog.tmcnet.com