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.
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! Woo-hoo!
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
Disable the autotunning feature in Vista completely, and fit and lock the RWIN receive window to default value 65536 bytes.
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:
- Type: netsh interface tcp set global rss=disabled
Update! This command makes your network connection EVEN FASTER
Type: netsh interface tcp set global autotuninglevel=highlyrestricted
The reason is that this command will still "auto tune" your TCP connections, but not as drastically as 'normal' mode. It will allow the receive window to grow beyond the default value, but again it will do so very conservatively. In this mode, Vista will by default use RWIN (receive window) of 16,384 bytes with a scale factor of 2. I was browsing computers in my Network Neighborhood and trying to get to \\computername\c$ which was taking forever to load. I changed it to highlyrestricted and it was much faster. 'highlyrestricted' mode is my recommendation for the fastest network performance whether you are using Remote Desktop, Internet browsing, or doing SMB file copies across your network.
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!



Technorati
Del.icio.us
Slashdot
Digg
twitter
Thank you so much for this, I just wasted an entire afternoon trying to solve this problem!
It only happened for me when remote desktopping to certain servers .. others in the same DC on the same network were unaffected. Those affected servers had been recently patched so I mistakenly focused my attention on the server, rather than the client.
Anyway, yet another thing to hate in Vista.
Thanks again
Ben
Tom Keating, you are a god. THANK YOU!!!
Be aware, this problem affects more than just remote desktop applications. Firefox 2.0 will have trouble talking to your server. So if you are hosting a website you are better to disable the feature on the server.
See: http://support.microsoft.com/kb/224829
I'm tied of problems with MS Remote Desktop. It's too hard for me. TechinlineRemoteDesctop (www.techinline.com) seems to be easier and cheep enough.
Thanks! You're a lifesaver, this helped me so much that I've refferenced it from my blog also!
Absolute Genius...you have single handedly fixed all my windows vista networking woes... CHEERS!!!
Hey....gr8 work dude....i got my problem solved...thank u so much...
Thank youuuuu,
I was about to hit a cardiac arrest i have worked very,very,very slowly the past day i was going nuts...
Thanks
Thanks for the solution!
Thank you - this has been a thorn in my side for a good while now. It's a major relief!
Thank you -- we were about to send our Vista laptops back to Redmond 'discus' style...they should send you dividend payments...
This looks great, but | am having a mouse problem with remote desktop connecting from XP to a XP system.. both of them are very capable systems.. just that the mouse is updating with a refresh rate of 0.3 seconds.. it doesn't move smoothly across the screen.. and the problem is just in one way.. connecting in reverse works perfectly ...
any ideas ? tryied google.. but nothing
thanks
it didn't work.
the following response occured:
Set global command failed on IPv4 The requested operation requires elevation.
This is awesome! I was just about to give up on Vista when I found this and something finally worked.
You need to run the command prompt as administrator.
Right click on Start / All Programs / Accessories / Command Prompt and choose "Run as administrator"
Very well put - The RDP 6.0 was my first focus since it had problems with our Tricerat Simply Printing - Very well put on the solution!
RDP Hangups.
Well, when I use my desktop at home running windows XP RDP 6.0, I get a very strange behavior connecting to my Vista Ultimate machine at work.
First of all, yes, the issue is related. I connect perfectly fine to 2003 servers and other windows XP systems, secondly, I have tried the options adjusting the autotuninglevel as well as the rss option.
Now, the strange thing about this is, that some days - you read right - days - the connection works perfectly, no hangups at all, and great performance as well (testing for 8 hours at a time and full bandwith utilization as well). A few other days I get hangups like every 10 minutes or 30 minutes. I can live with that.
But the last few days, I can barely stay connected at all. I get 1 or 2 seconds of "live feed" before the window freezes entirely for a typical 30 seconds.
Next, at all times, I connect fine, when first connecting RDP to a Server 2003, then once more from the Server 2003 to the Vista machine, however the latency in this setup is understandable.
My colleage at work, connects fine from his XP machine at home, to his Vista machine at work, and our setups are identical.
In the meanwhile, while connected, I can type things, and move the mouse, and while doing that I register outgoing and incoming RDP tcp packets.
Now, our network at work is flawless, everything is dupped and Microsoft-by-the-book, my connection at home is SHDSL 2mbit/s, even tried using cFosSpeed, which enlarges the default XP tcp receive window size and utilizes an improved QoS traffic control - no improvement what-so-ever. I even tried iShadow, which utilizes an alternative RDP client, whith same results - and last, I even tried a different network connection.
The Vista machine at work has all other network related software disabled, even the firewall.
Personally I'm a developer who has worked with all different kinds of strange network protocols, but this flaw beats me. Since nothing appears to be "wrong" with the connection itself, the transportlayer or drivers etc., I then looked a litle closer, and noticed, that not all parts of RDP freezes in the hangup, which essentially leads me to believe, that the flaw must be somewhere in the application layer on the Vista machine. I notice for instance, that mousemovements and keyboard control create a reaction at the Vista machine towards my XP while in hangup, and all input seem to appear in perfect order when returning from hangup. When escaping hangup, the tcp status window reveals a spike of data received at the moment of return, like the Vista machine has buffered the data.
Now something in my guts tell me, that the bug is related to some time-frame synchronization issue in the RDP graphics update system. Sometimes such an issue may be hard to track, but a good example is a piece of network software, which works only between 00:00 am and 12:00 pm. In this example, a bug is revealed, where the system "forgot" to send the "pm" signal along with the datetime data. Now imagine this issue on a more complex level, when packed, then unwrapped and some bits get missing in the process = boom, a time synchronization failure at apparently random intervals, which only appears at "certain moments" and only within specific setups.
A time-frame is basically a timestamp in a streaming protocol, allowing a fluent regeneration of frames on the receiving part. The frame architecture may vary from "01-dec-99 00:01:59.123" to a basic 0x001234e6f9. A timestamp is much like a framecounter on a videorecorder, but is an essential part of any streaming protocol.
I hope this may get some Microsoft developer up the chair saying "of cause, stupid me"
You are great, thanks! I had gotten used to just using key strokes and just ordered a machine without Vista largely because of this. Now my tiny little tablet is functional again. Thanks!
nice one problem solved for me
Thanks
Is there any possible way to run the netsh command to disable TCP receive autotuning without administrative privileges? I'm using the client from a cluster.
-mike
Clarification: I'm using remote desktop 6.0 from a cluster on which I have no Administrative Access (only user access) to connect to my own computer (Windows Server 2003 x64) on which I do have Administrative Access.
I've tried setting the TCP1323Opts and TCPWindowSize on my Windows Server 2003 x64 computer to emulate the Vista TCP/IP settings, but the problem still persists. Is there any way to modify my server machine to emulate Vista correctly?
I really don't want to install Longhorn....
-mike
Brilliant - how are we lesser mortals supposed to manage without people like this? Why does Microsoft throw these "improvements" in our way when only a selected talented few have the knowledge to find these fixes?
Did nobody in Microsoft try RDPing to an XP server in the test phase of Vista? Try opening an Office XP Excel spreadsheet by double click from a folder and it takes a minute or more (There's a fix for that of a similarly obscure (to lesser mortals) nature to this one)- did nobody at Microsoft try this either?
Thanks again Tom Keating - Bill Gates owes you a beer!
Jim Currie
I worked days at a snail's pace...
Freedom!
Thanks!
Just quickly wanted to confirm other comments made here. Your solution is just great! It saved me hours of investigation in Technet et. al. Thank you very much for sharing this info!
Mark.
This only happened when i connected to 2003 R2 servers. Thanks so much. Now I can continue to use/test my Vista machine instead reverting back to XP for administration.
OMG its sooooo fast now!!!
Thank You
Shame on Microsoft .. just another problem with Vista ... what a waste!
My problems started after I installed Service Pack 2 for Windows Server x64 so I thought this wouldn't be the problem, but it was. Thanks for the suggestion.
Thx, been keeping XP in another machine just so I could use RDP into my box now can get back to using Vista in both, nice seeing RDP work again...
Thx. Neil
I've been searching for this answer for MONTHS!!! Thank you, thank you.
By the way, the only instances I've seen this are with a Vista machine remote desktop connection into a Windows 2003 R2 Server with SP2 installed. It has never happened to me on plain-old 2003 servers with SP2, yet happens on both x86 & x64 2003 R2 Servers.
Thank U very much! I had the same problem also with remote folder access and it solved my problem too! You're answer was my second choice in Google and bingo, problem solved.
Hi
I have vista ultimate version. Doing remote desktop from windows xp professional and RDP was very slow and dropping time to time. Even I did the following...
- disabled ipv6
- "netsh interface tcp set global autotuninglevel=disabled",
- netsh interface tcp set global rss=disabled
and after all these steps, problem was not solved. Please help me out.
-posam
You flippin' legend. This is exactly what I needed and it not only affects RDP but network access as well! we have a vista xp server 2003 network and ever since this workaround the vista machines on the network have been hugely faster
Well done
Hi Tom
I have been working with this slow problem for a few weeks. I was login on to second servers to get around the issue.
I decided to see if there was a resolution on the web for the issue. Your Page was the first page I found and resolved the issue in seconds.
Only comment is you might want to state that the command is run on the Vista Client not on the server. I know this might sound obvious, but you know what end users are like.
Thanks a heap
Craig
Thank you very much.
This solve my problem and all this time I was blaming remote server.
Alex
You Rock!
Thanks for the info.
Rick
Like everyone else thanks for saving me from a hatful of heartache with this tip.
My scenario was an old Philips laptop running Vista Home, no problems RDP plus admin of a database on the 2003 server from a local admin program. Replaced with a brand new Dell Vostro super spec with Vista Business which ran like a dog on the 2003 server trying to administer the sql database using a local admin prog and RDP.
Thanks again
James
Thanks for the tip, this has helped us tremendously. As a side note this also significantly improved connections to our outside production SQL server when using SQL Management Studio.
Dear Tom,
thank you very much, it solved my issue. Also notice, that not only RDC is affected by this, in my case it was also PL/SQL developer. And same as some else posted, it happened only when connecting to Windows 2003 R2 Server with SP2 installed.
It can also happen, that Vistas will turn this feature back on once you try "Diagnose and repair" for your network connection, it suggest you to "Turn on TCP performance improving settings" which does the job...
Regards
Honza
This fix works great for me. However, I have one machine that continually reverts back to previous settings on it's own. No system restores have been done. No software changes have been made. We just boot up the laptop one morning, and RDP runs slow again. Once we redo the commands it works fine for a while, but then it'll happen all over again. Any suggestions would be great. Thanks!
This problem has been solved by Microsoft [finally]. Hotfix KB 948496.
Hi,
I have Windows Vista Ultimate SP1 in a brand new laptop I bought 4 months ago from Dell. Everything worked fine except the client SQL Server Tools when connecting to a remote hosted database, getting a very very slow response in connection and commands in general.
I have tried many many things.
The following command (that I found on your website):
netsh interface tcp set global
autotuninglevel=disabled
... made the thing work fine again
The weird thing is I am not using Remote Desktop and occasionally found this post (as I googled with the "remote" word).
I am very happy with the results and I wonder if there is some explanation to my "accidental" solution achievement.
And anyway, Thank you very much for the help, this tip saved my year.
Regards,
Jacques Zetune
Yes that autotuning setting especially causes all sorts of networking problems, not just remote desktop.
I had problems streaming video from my vista machine to my PVR until I run those commands, it's worked fine ever since.
There is a company called Expand Networks that has a unique solution to improving the performance of RDP, Citrix and other thin clients, especially useful in environments with alot of users.
http://www.expand.com/Products/Free-Evaluation.aspx
you may also want to check out Array Networks at arraynetworks.net
Thanks !
Same as the guy above, I was about to hit a cardiac arrest aswell :-)
I'm using the mstscax.dll in an application of my own, and thought it was a problem in my application.
But apprently it isn't, problem solved!
If your like to use RDP over internet using microsoft windows teredo service(peer to peer connectivity) you can check this soft http://www.lanoninternet.com
Now RDP can work behind NAT/firewall.Since its peer to peer connection it is much faster than remote access solution
I do not have Vista but am having the same very slow response times for my mouse clicks and screen views when using remote access on my laptop using XP professional when I connect to my Windows 2003 server. Can anyone offer a suggestion?
So thats how remote desktop is suspose to work on Vista, and I was ready to smash this laptop at times. Great job.
I have my primary dc with 2k8 64 bit, 12.gb RAM, 2 dual core 2.2 GHz processors. very clean and brand new. My XP machine would connect to this server by RDC and was a slug. The same server at the console was very responsive. When I ran both netsh commands on the server, all delays were gone! Great blog and information. Keep up the good work.
I am so happy for you all!...
But for me (with exactly the same problem) changing these settings (autotuning AND rss disabled; confirmed and rebooted) DID NOT solve the problem. I am still waiting 30 seconds (!) or more sometimes for one mouse click on my Vista Client PC to be registered on the XP server!
I am having this problem for more than 2 years now and it's driving NUTS. I have recently migrated from CheckPoint to Cisco VPN, but the problem remains.
Please, please give me some hints why this solution may NOT work for me, while everyone else seems to be speeding their way through remote desktop linked Vista/XP.
Sincerely
Jan
jan,
This may be due to delayed ack. Your xp pc might have formed small chunks of packets for reply of mouse click for which vista delayed acks. Can u try disabling the delayed acks by setting TcpAckFrequency value to 1.
Follow this link:
http://support.microsoft.com/kb/328890
Master !! I´m having this problem in Terminal Server ST 2003 and XP-RDP clients, but not solve my problem.
Please help!!
Thanks in advance
Here s variation on this, I am using Windows 7 64 bit, when I RDP to "certain" Windows 2003 Servers and Windows 2000 servers not only is the RDP session slow as described above but it brings the REAL server console to a crawl, it also affects network connectivity to the server ? Any ideas, I tried the steps above but no go.
I have a real mix this affects, some Windows Server 2003 SP1 are affected and some are not, have not found an SP2 that does this yet but still trying, Windows Server 2000 comes to a complete halt almost when I RDP to it.
I am not finding much on the internet about it ?
Phill
I was using a Windows 7 enterprise client to manage a Windows Server 2003 R2 SP1, and it worked without problem. After patching to SP2, remote deskop was almost unsable.
Then your solution resolved this problem! Thx !
Just an update, I went back to Windows 7 32 bit (both RC and final release) and I do not get this behavior, only from Windows 7 64 bit RC and final. If I RDP to the affected servers from a VM of say XP on the same box it is no problem, which is weird ? Eventually this just got in the way of how I work so I went back to 32 bit. On one Windows 2000 server on our DMZ, when I RDP to it from Windows 7 64 bit the server console cannot be used and that whole network just gets flooded with traffic, weird problem and I never worked out what it was.
I am using win7 32bit RC 7100 build. I am having the same issue.When i make a rdp session to W2k which is our domain controller, the cpu usage becomes 100% and trmsrv and rdpclip process are consuming 70% resources. Please help
Hat off for you, Sir.
I'm logging in from Vista 64 into a Dell T300 Server running XP Pro 64 and have the same problem. I can log into the server from an XP machine no problems, but from my Vista machine its virtually useless.
I tried the fixes mentioned here, but to no avail. Any ideas? Does this solution not work because I'm attempting to connect to a XP box as opposed to Server software?
I have the same issue at my work. I have to connect through app tunnel (using CrossLink app). Connecting from my Windows7 to Win2000/2003 is extremely slow.
Strange enough, it works OK from my colleague's machine also running Windows7!? As expected it also works OK from WinXP.
Running the commands didn't slove my problem. Restared my machine, run them again, slow slow slow..
Unfortunatelly, didn't help me...
This issue was bugging me for over a month.
I am running Windows 7 x64 RTM (build 7600).
The suggestions above did not help.
Finally I went on a googling spree and came across a suggestion to turn off TCP checksum offload which significantly improved things for me.
Here is how to if you are still having issues after trying the suggestions in the blog post:
http://www.techsupportforum.com/networking-forum/protocols-routing/248812-wireshark-question-tcp-checksum-offload.html
(post #4)
I used this with the latest update in the blog post:
netsh interface tcp set global autotuninglevel=highlyrestricted
Give it a go and I hope it works for you too.
And its pretty usable now. Although its still far from convenient... any tips on how to make it even faster will be appreciated!
Thanks
-Pino
I have just had the same (or similar problem) with Windows XP 64 bit version but the command solution listed here didn't work for me. I ended up just downloading a new version of Remote Desktop from Microsoft and it is now blazingly fast.
Here's where I got it: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=160ce316-bf2b-48d0-a035-e2abbc55d8e8
Hope this helps someone.
Lifesaver!
Great article!!!
I wanted to ask one thing; what is the minimum bandwidth required to use remote log on? I mean I have ~100 kbps (bits) download and ~50kbps upload speed and remote connection keeps on breaking down.
Manoj
omg, i love you. I had the reverse problem, connecting from 2003 (my workstation) to server 2008 was dog slow. Ran the same commands on the server, logged out, logged back in - now very fast.
Thanks for posting. You are awesome.