Configure initial congestion window to speed up TCP slow start

When creating a TCP connection, then it doesn’t sent data at full speed, even if the receiving end have setup a large receive-window (RWIN). The sending side will perform a TCP slow start, where it first sent 2 frames (MSS) and waits for ACK response, and if no packet drop then it will increase speed exponentially from there. So short living TCP connections, like those to a Web-Server, will experience poor performance (slow latency).

The TCP slow start will also be activated if there have been no traffic for 200 ms., then the TCP stack will test again if network connection is as good as before. So long living TCP connection, with occasional bursts of data, will experience poor performance (slow latency).

The initial congestion window size of 2 frames was perfect, when using dialup modems, but with modern network connections, then it is actually a bottleneck. Now the recommended size is 10 frames (MSS).

It is possible to change the initial congestion window on Windows 2008 R2. This command will display advanced TCP options:

netsh interface tcp show supplemental

Note the above command will fail if the hotfix KB2472264 has not been applied.

Execution these two commands will set an Initial Congestion Window (ICW) of 10 frames (MSS):

netsh interface tcp set supplemental template=custom icw=10
netsh interface tcp set supplemental template=custom

Note for long living TCP connections, then one can workaround the TCP slow start triggered by occasional pause in traffic (Without touching ICW). The simple solution is that the sending side sends a keep alive packet every 150 ms. Alternative the receiving side can cheat and send a ping operation every 150 ms. that causes the sending side to reply back and thus prevent TCP slow start from happening.

More Info RFC3390
More Info Google 2012: Draft for increasing ICW to 10
More Info Jim Gettys 2012: Increasing ICW to 10 is harmful

Related Compound TCP (CTCP) can improve TCP Slow Start
Related TCP_NODELAY disables nagle algorithm and can improve latency
Related TCP/IP RWIN Auto-Tuning can slow down network

Credits Andy’s Notebook