Windows TCP/IP implementation: Reset can increase network performance

Windows[German]Another addendum to the topic "Microsoft's TCP/IP implementation in Windows and the pitfalls". In the TCP implementation of Windows 10 and Windows 11, Microsoft has built in some pitfalls that severely limit the possible performance of TCP/IP connections. There may be cases where the TCP/IP settings that Windows makes internally have been tweaked so badly that a reset of the TCP/IP stack can work wonders and greatly increase network performance.

Problem Windows TCP/IP optimization

The abbreviation TCP stands for Transmission Control Protocol, a reliable, connection-oriented, packet-switched network transfer protocol that defines the way in which data is to be exchanged bhttps://de.wikipedia.org/wiki/Transmission_Control_Protocoletween network components. Almost all current operating systems of modern computers are capable of TCP and use it to exchange data with other computers.

In 2023, blog reader Alexander Fuchs (who goes by the alias MysticFox online) drew my attention to massive problems with TCP/IP implementation under Windows. To summarize, the following picture emerges:

  • In Windows 10/11, all outbound TCP connections are handled via the Internet TCP profile. By using the Internet profile, TCP connections to the network are artificially slowed down (e.g. via the latency of the ACK packets) (see this article by Dan Cuomo, Microsoft).
  • In addition, the settings of the TCP profiles Internet and Datacenter currently used in Windows versions were defined at the time of Server 2012, based on the Internet connection properties at that time.

This sometimes leads to a sharp drop in network throughput. Alexander carried out some investigations in this context and subsequently published PowerShell optimization scripts that optimize the settings in the TCP profiles Internet and Datacenter. I have already reported on this issue and the scripts several times here in the blog. The details can be found in the blog posts linked at the end of the article.

I would like to add one more point. There may be cases where the TCP/IP settings that Windows makes internally have been tweaked so badly that optimization no longer works and resetting the TCP/IP stack can work wonders and greatly increase network performance.

Problem: TCP/IP settings messed up

When analyzing the performance degradation caused by TCP/IP settings, Alexander noticed that in certain cases the optimization simply did nothing. Back in January 2023, the blog reader came across a thread One-sided Speed Problem – Layer 2 Bridge (Cambium V3000 – V5000) in the Spaceworks community, which also dealt with this issue.

In his tests on network throughput between a Windows client and a Windows server, he achieved values between 56.38 MB/s and 322.30 MB/s (depending on packet size) on a 10 gigabit network. When analyzing the problem of why TCP/IP network connections do not achieve optimal throughput, the blog reader then simply reset the TCP/IP interface using the command line command:

netsh interface tcp reset

The command resets the TCP/IP stack including the parameters used there. He then ran his optimization script again and experienced his personal miracle with the network throughput between a Windows client and a Windows server. A 10 GBit connection was tested, whereby the throughput was determined using the psping64.exe tool. The packet size can be specified for the Sysinternals tool psping64.exe via the parameter l. After optimizing the TCP/IP parameters, it was able to measure the following throughput:

4K = 831,05 MB/s
8K = 1023,49 MB/s
16K = 1011,12 MB/s
32K = 1,05 GB/s
64K = 1,09 GB/s

Depending on the packet size, transfer rates of 1 GB/s could be achieved. The result was worlds above the throughputs that the reader was able to achieve before the TCP reset.

Attempt at an explanation

Alexander carried out some experiments with different Windows versions in virtual machines and then contributed some of his findings to the discussion on German forum administrator.de. My interpretation in a nutshell: Windows tries to optimize its TCP stack or the (default) settings for TCP/IP connections to a remote peer after setup.

Depending on the remote station, this can lead to settings such as Delayed ACK being set very unfavorably. However, as these parameters are in the TCP/IP profile, this affects all network connections. If the parameters have been negotiated unfavorably at some point, the network throughput rates for connections to other machines will also be very poor.

Resetting the TCP/IP stack and then restarting Windows causes the internal settings to be reset to the factory settings. The reader's optimization script can then bring the throughput of the TCP/IP connections back to reasonable values. This should be of particular interest to administrators who have problems with the network throughput of Hyper-V machines. Perhaps keep the whole thing in mind – the details can be found in the two threads in the Spiceworks Community and on administrator.de.

Similar articles:
Microsoft's TCP mess, how to optimize in Windows 10/11
Windows 10/11: Poor network transfer performance, high Windows 11 CPU load – Part 1
Windows 11: Optimize network transfer performance and CPU load – part 2

This entry was posted in Windows and tagged , . Bookmark the permalink.

One Response to Windows TCP/IP implementation: Reset can increase network performance

  1. EP says:

    instead of using "netsh interface tcp reset" what happens when "netsh int ip reset" is used?

Leave a Reply

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