One of my clients recently deployed Windows 7 across their network and are experiancing performance issues when accessing network resources involving MS-RPC calls such as network shares through the SMB protocol. Windows Vista/2008/7 has a new TCP network stack to Windows XP/2003 and has a number of new technologies designed to increase network performance.
Windows XP/2003 clients are not receiving performance problems.
Issue
When a Windows 7 PC attempts to accesss file shares on any Windows XP/2003 servers, browsing performance of mapped network shares is aporling. It feels simlar to accessing the file server over a VPN connection with poor bandwidth and high latency, however in this scenario we are accessing the file server over LAN. We tested a Windows 7 client on the same 24bit subnet as a number of Windows 2003 file servers on a 1gbps network. Slow access to network shares also occured over the same subnet.
What I did notice however was slow performance did not occur when a Windows Vista/2008/7 computer accesses file shares on another Windows Vista/2008/7. The issue only occured when Windows Vista/2008/7 accessed Windows XP/2003.
This issue is not driver related, I ensured to test workstations of different driver architecture including Intel and Broadcom network drivers.
Workaround
After researching into this issue we came identified two Windows components contributing to the performance issues.
TCP Auto-Tuning
As mentioned above, a new TCP stack was implemented as of Windows Vista that aims to take full advantage of hardware advances such as gigabit networking. Among the new feature in the new TCP stack is Receive Window Auto-Tuning Level for TCP connections. TCP AutoTuning enables TCP window scaling by default and automatically tunes the TCP receive window size for each individual connection based on the bandwidth delay product (BDP) and the rate at which the application reads data from the connection, and no longer need to manually change TcpWindowSize registry key value which applies to all connection. Theoretically, with TCP auto-tuning, network connection throughput in Windows Vista should be improved for best performance and efficiency, without registry tweak or hack. However, this is not always the case, and may cause some performance related issues such as in our case.
The default auto-tuning level is "normal", and the possible settings for the above command are:
netsh int tcp set global autotuninglevel=restricted
Remote Differential Compression
Remote Differential Compression (RDC) is a client–server synchronization algorithm that allows the contents of two files to be synchronized by communicating only the differences between them. It was introduced with Windows Server 2003 R2 and is included with later Windows client and server operating systems. As of Vista onwards Remote Differential Compression is enabled by default.
Microsoft does not recommend ever disabling Remote Differential Compression (RDC) unless there is an absolute need to. Diane from Microsoft wrote a blog post entitled "Debunking Myths about Remote Differential Compression and System Performance" where she states:
A number of third-party blogs are telling people they can speed up Windows Update downloads, and file copy operations, by turning off the Remote Differential Compression (RDC) feature on Windows Vista. This is 100% false. Neither Windows Update or file copy operations use RDC at all.
The RDC feature is simply a DLL that does not consume any system resources, except when you run an application that uses RDC specifically. If you disable RDC, any application that uses it will either not be able to take advantage of RDC or will simply fail. For more information on RDC see this link http://msdn.microsoft.com/en-us/library/aa373254(VS.85).aspx.
As a result I do not recommend disabling RDC unless you have an absolute need to. In my environemnt I tested my Windows 7 PC's with RDC turned on and RDC turned off. When turned on I noticed my performance to Windows 2003/XP file shares diminished. Please disable with care.
You can disable RDC through Windows Features in control panel:
You can also disable RDC through command line using the following command:
ocsetup MSRDC-Infrastructure /uninstall
Deploying the Workaround
I wrote a batch script to deploy this workaround to all Windows 7 computers on my network. The batch script first identifies IS the computer running Windows 7, if so THEN set TCP Autotuning to Restricted and disable Remote Differential Compression.
Here is a copy of my script:
@echo off
systeminfo | find "OS Name" > %TEMP%\osname.txt
set /p vers=<%TEMP%\osname.txt
echo %vers% | find "Windows 7" > nul
if %ERRORLEVEL% == 0 goto ver_7
goto warnthenexit
:ver_7
ocsetup MSRDC-Infrastructure /uninstall
netsh interface tcp set global autotuning=restricted
goto exit
:warnthenexit
echo Machine undetermined.
:exit
Deploy this script to your workstations through a Group Policy Startup Script.
Note: Due to the Windows 7 performance issues I also needed to configure "Always wait for the network at computer startup and logon" under "Computer -- Administrative Templates -- System -- Logon"
Windows XP/2003 clients are not receiving performance problems.
Issue
When a Windows 7 PC attempts to accesss file shares on any Windows XP/2003 servers, browsing performance of mapped network shares is aporling. It feels simlar to accessing the file server over a VPN connection with poor bandwidth and high latency, however in this scenario we are accessing the file server over LAN. We tested a Windows 7 client on the same 24bit subnet as a number of Windows 2003 file servers on a 1gbps network. Slow access to network shares also occured over the same subnet.
What I did notice however was slow performance did not occur when a Windows Vista/2008/7 computer accesses file shares on another Windows Vista/2008/7. The issue only occured when Windows Vista/2008/7 accessed Windows XP/2003.
This issue is not driver related, I ensured to test workstations of different driver architecture including Intel and Broadcom network drivers.
Workaround
After researching into this issue we came identified two Windows components contributing to the performance issues.
- TCP Auto-Tuning
- Remote Differential Compression
TCP Auto-Tuning
As mentioned above, a new TCP stack was implemented as of Windows Vista that aims to take full advantage of hardware advances such as gigabit networking. Among the new feature in the new TCP stack is Receive Window Auto-Tuning Level for TCP connections. TCP AutoTuning enables TCP window scaling by default and automatically tunes the TCP receive window size for each individual connection based on the bandwidth delay product (BDP) and the rate at which the application reads data from the connection, and no longer need to manually change TcpWindowSize registry key value which applies to all connection. Theoretically, with TCP auto-tuning, network connection throughput in Windows Vista should be improved for best performance and efficiency, without registry tweak or hack. However, this is not always the case, and may cause some performance related issues such as in our case.
The default auto-tuning level is "normal", and the possible settings for the above command are:
disabled: uses a fixed value for the tcp receive window. Limits it to 64KB (limited at 65535).In my environment changing this from the default value of normal to restricted resolved my performance issues.
highlyrestricted: allows the receive window to grow beyond its default value, very conservatively
restricted: somewhat restricted growth of the tcp receive window beyond its default value
normal: default value, allows the receive window to grow to accommodate most conditions
experimental: allows the receive window to grow to accommodate extreme scenarios (not recommended, it can degrade performance in common scenarios, only intended for research purposes. It enables RWIN values of over 16 MB)
netsh int tcp set global autotuninglevel=restricted
Remote Differential Compression
Remote Differential Compression (RDC) is a client–server synchronization algorithm that allows the contents of two files to be synchronized by communicating only the differences between them. It was introduced with Windows Server 2003 R2 and is included with later Windows client and server operating systems. As of Vista onwards Remote Differential Compression is enabled by default.
Microsoft does not recommend ever disabling Remote Differential Compression (RDC) unless there is an absolute need to. Diane from Microsoft wrote a blog post entitled "Debunking Myths about Remote Differential Compression and System Performance" where she states:
A number of third-party blogs are telling people they can speed up Windows Update downloads, and file copy operations, by turning off the Remote Differential Compression (RDC) feature on Windows Vista. This is 100% false. Neither Windows Update or file copy operations use RDC at all.
The RDC feature is simply a DLL that does not consume any system resources, except when you run an application that uses RDC specifically. If you disable RDC, any application that uses it will either not be able to take advantage of RDC or will simply fail. For more information on RDC see this link http://msdn.microsoft.com/en-us/library/aa373254(VS.85).aspx.
As a result I do not recommend disabling RDC unless you have an absolute need to. In my environemnt I tested my Windows 7 PC's with RDC turned on and RDC turned off. When turned on I noticed my performance to Windows 2003/XP file shares diminished. Please disable with care.
You can disable RDC through Windows Features in control panel:
You can also disable RDC through command line using the following command:
ocsetup MSRDC-Infrastructure /uninstall
Deploying the Workaround
I wrote a batch script to deploy this workaround to all Windows 7 computers on my network. The batch script first identifies IS the computer running Windows 7, if so THEN set TCP Autotuning to Restricted and disable Remote Differential Compression.
Here is a copy of my script:
@echo off
systeminfo | find "OS Name" > %TEMP%\osname.txt
set /p vers=<%TEMP%\osname.txt
echo %vers% | find "Windows 7" > nul
if %ERRORLEVEL% == 0 goto ver_7
goto warnthenexit
:ver_7
ocsetup MSRDC-Infrastructure /uninstall
netsh interface tcp set global autotuning=restricted
goto exit
:warnthenexit
echo Machine undetermined.
:exit
Deploy this script to your workstations through a Group Policy Startup Script.
Note: Due to the Windows 7 performance issues I also needed to configure "Always wait for the network at computer startup and logon" under "Computer -- Administrative Templates -- System -- Logon"

I'm having an issue at a client who runs on their workstations but the shortcuts point to the app on the server and the app reads alot of data from the server.
ReplyDeleteSince putting in Windows 7 on a few clients on the clients with Windows 7 are having major performance issues in the client. Do you think this would solve the issue?
Thanks Clint. Changing just the TCP Auto-Tuning fixed my problem.
ReplyDeleteOk, so I just need to comment because your spelling is kinda bad, and I found it hard to take what you said seriously.
ReplyDelete1) "Aporling"? Ouch. That's just brutal. Google a word if you're not sure how to spell it properly. It's not just a typo when you write "aporling" instead of "appalling".
2) experiAncing = experiEncing
3) "It feels simlar..." (similar)
You've got a lot of certs so you'll still get decent work, but I advise you to spell check anything you publish on the internet. People want to be able to focus on your IT knowledge, not get distracted by abysmal spelling.
Anonymous - The fact that he has taken the time to respond to an issue that has affected many is cause enough to overlook a typo or spelling error. FYI - "kinda" is not a work it is spelled "kind of" They make medication for people just like you.
DeleteClint, thank you for your post; I have not attempted your workaround yet but have encountered the same issue on a new system running W7 Pro on a Windows XP 2003 Server. Hopefully, this will help.
Yes, that is a typo....word* Boy am I in for some serious criticism.
Deletedid you ever hear the saying "tis a poor man that cant think of at least two ways to spell a word" in any event I really appreciate his technical input, I hope it will resolve my issues
DeleteThis is my personal blog where I write about my experiences working in the IT industry. I have a busy schedule and do not have the time nore resources to get content reviewed before it is published. All content on my blog is "as is" and with no warranties or guarantees.
ReplyDeleteMr Anonymous Spell checker, thanks for pointing out how ANAL you are! I would think if you wanted to be Clint's publisher the job is yours! (I know I am speaking out of line as I don't know Clint) but I for one (even if it does not resolve my problem today) appreciate what he has posted for down the road.
ReplyDeletePersonally, I think your a real jerk for your posting and my opinion is if you don't like what you see, don't read it. Why are you here if you don't like his posts? Your as bad as a Mac Lover that hangs out in Microsoft forums to bash Microsoft. Seriously, I'd rather you not be here and you obviously don't care for what your reading, so leave. Again, i am speaking out of line as I too am a guest here.
tHis lin wus mad 4 annnonnommmouuusss pooser how speal chks... - Mr. Me-off... As in Jack...
Running only the auto tuning command on the Win2k8 server instantly resolved our problem:
ReplyDeletenetsh int tcp set global autotuninglevel=restricted
It only took a million google attempts to find this page.
THANKS!!!
Thanks for posting this.
ReplyDeleteWhen I try to do netsh.. on the command prompt, I get this error message:
"Set global command failed on IPv4. The requested operation requires elevation (Run as administrator)."
However, my user account IS set to admin.
Help?
PS Whip me with a weasel in case I made any spellung mustayks.
solution here: http://www.chicagotech.net/netforums/viewtopic.php?t=1619
ReplyDeleteEsaleOz - Cheapest Audio Visual, Computer and Electrical Cables in Australia including; HDMI, DVI, IEC, CAT6, RCA, Ethernet,VGA and Fibre Optic
ReplyDeleteThanks a lot!
ReplyDelete