Networking

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):

autotuning01

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.

autotuning02

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.

autotuning03

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.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.