this was taken from
http://www.onegeek.ca/index2.php?option=com_content&do_pdf=1&id=35
because I didn't want to lose itThis was originally posted by Tom Keating on another site.
Here's the original post link, didn't want to lose this baby so I copied it to my site too.
http://blog.tmcnet.com/blog/tom-keating/microsoft/remote-desktop-slow-problem-solved.asp
If you're having issues with an RDP session just being slow, as in delayed in transmitting the desktop or mouse clicks,
and other communications to a perfectly good server, check this out.
Looks like is a QoS in Vista policy.
Remote Desktop slow problem solved
April 19, 2007
Remote 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.
One Geek
http://www.onegeek.ca Powered by Joomla! Generated: 31 August, 2007, 14:26
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 email
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.
With better throughput between TCP peers, the utilization of network bandwidth increases during data transfer. If all the
applications are optimized to receive TCP data, then the overall utilization of the network can increase substantially,
making the use of Quality of Service (QoS) more important on networks that are operating at or near capacity. Obviously,
this feature is good for ensuring better Voice over IP quality as well.
In any event, I discovered that Vista's Receive Window Auto-Tuning could have issues on some networks. I really didn't
want to disable Receive Window Auto-Tuning due to it's QoS, bandwidth speed/throughput, and VoIP quality benefits,
but I had no choice. I use Remote Desktop all the time to manage 30+ servers. After disabling Receive Window Auto-
Tuning, the "slowness" problem with mouse-clicks, keystrokes, and screen redraws went away. Problem solved! Woohoo!
Here is what you need to do if you have the same issue:
- Run a command prompt (cmd.exe) as an Administrator
- Type: netsh interface tcp set global autotuninglevel=disabled
If you want to to re-enable it:
- Type: netsh interface tcp set global autotuninglevel=normal
In some cases you may need to use this command in addition to the above, but I didn't have to:
One Geek
http://www.onegeek.ca Powered by Joomla! Generated: 31 August, 2007, 14:26
- Type: netsh interface tcp set global rss=disabled
Now, because Receive Window Auto-Tuning increases network utilization of high-BDP transmission paths, the use of
Quality of Service (QoS) or application send rate throttling is important for networks that are operating at or near
capacity. So I'd like to get this feature working, which will require some network topology examination. I did read that
Windows Vista supports Group Policy-based QoS settings that allow you to define throttling rates for sent traffic on an IP
address or TCP port basis. So perhaps I can just disable auto-tuning for the RDP port 3389 and leave it on for all other
ports.
I'm headed over to Microsoft's site which has some excellent resources on policy-based QoS. From my initial research it
looks like you can configure some pretty nifty QoS policies. For example, you can specify a QoS policy with a DSCP
value of 46 for a VoIP application, allowing routers to place those packets in a low-latency queue, or you can use a QoS
policy to throttle a set of servers' outbound traffic to 512 KBps when sending from TCP port 443 (HTTPS port). In theory,
I can set Remote Desktop to have "top" priority and give it all the bandwidth it needs. Heck, maybe I'll set just my IP
address and my Remote Desktop port to have top priority on our network. To hell with the rest of my fellow co-workers!
They don't need no stinkin' bandwidth. It's mine! All mine!
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5fEislyy0LZnvz6Wp-WDiwM3jYKFcKHRUcDVD1q0Y3Vfb64WPdaxGYLGyQdlKJ9ntNlt0N63fBJLXQweNKVwNCFiDhsTTFpobJGJCJgiwf1k-vPCZh5gT63LIGv3H4xMOdQ7z/s150/Untitled.jpg)
Friday, August 31, 2007
Subscribe to:
Posts (Atom)