2

I am designing a custom TCP/IP framework, and I am experiencing some latency issues that I believe are caused by TCP slow start. The framework will have TCP connections that are idle for fairly long periods, and the first message(s) that are sent over the connection after sitting idle are much slower than ones following soon after.

I read in this post: Disable tcp slow start , that it is possible to disable/manipulate slow start on linux platforms. Is there some way of accomplishing this in a windows environment, either in code or through some registry or command prompt capability?

Community
  • 1
  • 1
Cobalt
  • 938
  • 9
  • 21
  • What testing have you done to determine that is the cause of your problem? You do not want to spend a lot of time and effort fixing the wrong thing. – Ron Maupin May 13 '17 at 00:20
  • Well, I had enabled the keepalive packets and disabled the Nagle algorithm, and when I set the keepalive cooldown to a shorter time in order to keep the line busier during otherwise idle times, the latency decreased. I tested it on a dedicated router that had only my test devices running the custom framework on it. I couldn't find any reason other than the slow start that would cause this behavior, but if you have any other ideas of what else it could be I'd look into it – Cobalt May 15 '17 at 15:14

1 Answers1

1

What will potentially help you is increasing the initial congestion window; that will make your slow start less slow. How you do that depends on which version of Windows you're running. In Windows Server 2012 and 2016, you can use the Set-NetTCPSetting cmdlet; in 2008 R2 you can use netsh (you may have to install a hotfix first).

What should you set it to? The RFC linked above, from 2013, recommends 10:

Why 10 segments?

Questions have been raised on how the number 10 was picked. We have tried different sizes in our large-scale experiments, and found that 10 segments seem to give most of the benefits for the services we tested while not causing significant increase in the retransmission rates. Going forward, 10 segments may turn out to be too small when the average of web object sizes continues to grow. But a scheme to "right size" the initial window automatically over long timescales has yet to be developed.

You can, however, increase it up to 64 on 2012 and 2016. You can try different values and test your system to see which performs best.

Community
  • 1
  • 1
ejohnson
  • 655
  • 7
  • 18
  • Do you happen to know how to change the initial congestion window on Windows 7 Pro? I tried the 2008 R2 solution just for kicks, but of course it didn't work – Cobalt May 15 '17 at 17:11