TCP Auto-tuning slow network performance
Starting with Windows Vista, there were improvements made to the network stack including a little known feature called TCP Window Auto-tuning. ย The auto-tuning feature allows newer versions of Windows to be able to adjust the RWIN value automatically on the fly so to speak. ย While it does offer improvements in certain realms, it can also cause network performance issues. ย I wanted to detail a few scenarios of TCP Auto-tuning slow network performance and when I have observed this issue come into play
You can see your current TCP Auto-tuning values by issuing the NETSH command:
netsh int tcp show global
It will display something similar to the following (the following clip is taken from a Windows 10 workstation):
If you notice above, the lineย Receive Window Auto-Tuning Level is set toย normal. ย This is the default setting out of the box.
To turn off TCP Auto-tuning you can use the following command:
netsh interface tcp set global autotuninglevel=disabled
Another option is to set TCP Auto-tuning toย highlyrestricted which seems to have the same performance improving effect as disabling when connecting to legacy OS versions.
netsh interface tcp set global autotuninglevel=highlyrestricted
TCP Auto-tuning slow network performance
For the most part, I have seen the TCP Auto-tuning slow network performance issue come into play with new server OS’es and client OS’es talking to legacy server OS’es like Windows Server 2003. ย Especially in file copies, RDP sessions and SQL query performance the issue has been evident.
Slow File copy and RDP performance
In particular I have seen many cases where the file copies from newer operating systems to slower operating systems and back have been super slow. ย Recently, in an environment still running a Windows 2003 server, RDP from Windows 10 was horribly slow. ย The experience was one of the mouse freezing every 5 seconds or so for 2 or 3 seconds then it would release and keep doing that – basically an unusable state.
Slow SQL query performance
Recently, in working with a developer who was running queries from Windows 2012 R2 server running SQL 2012, he had horrible query performance querying data from an old Windows 2003 server running SQL 2005. ย You may be saying to yourself, Windows 2003 and SQL 2005 are not supported any longer, why would anyone be running those operating systems still? ย Sad to say, they are still out there in greater numbers than we would like to think, mainly due to legacy applications that are bound in some way to an older version of SQL/Windows for whatever reason.
Case in point, the query performance you see in the first screenshot is taken with the auto-tuning levels set at default. ย Notice theย msDur value in the first query. ย These values are connecting back to a legacy Windows 2003 server.
Now, the following screen clip is taken showing the query performanceย after turning auto-tuning off. ย Also, these values are connecting between sites so this is why they are still showing as much higher than the other query results you see.
Final Thoughts
If you are chasing a weird network performance issue that seems to have no other explainable cause, you may want to check into your TCP Auto-tuning settings. ย The TCP Auto-tuning slow network performance issue can be a difficult issue to track down especially since it is usually the last thing we think to look at. ย If you have a mix of legacy OS and new OS versions in your environment, it is a good bet you may want to focus on and test various settings with Auto-tuning to rule out any potential issues with network performance.