In November 2010, Ben Strong highlighted how Google and Microsoft were cheating on TCP Slow-Start by setting the initial congestion window higher than the RFC value.
Since then there’s been quite a few articles discussing the performance benefits of increasing the TCP initial congestion window (initcwnd). Most of the articles showed how to make the changes on Linux but there was no coverage on whether and how it could be increased on a Windows Server.
In one of their recent posts, Tuning initcwnd for optimum performance, the guys at CDN planet mentioned they didn’t know how to change the settings on Windows either.
Having trawled through the various options in netsh, I was coming to the conclusion it wasn’t possible but Drit Suljoti of Catchpoint pointed me in the direction of MS Hotfix KB2472264 “You cannot customize some TCP configurations by using the netsh command in Windows Server 2008 R2”.
After installing this hotfix I was able to change the initial congestion window to 10 (it can be adjusted up to 16 * MSS).
Installing and configuring
Request the Hotfix via http://support.microsoft.com/kb/2472264
Download and install the relevant version - it’s available in x32, x64 and ia64 flavours
Check the hotfix is installed ok
and you should see:
1 2 3 4 5 6 7
If you get the following then the hotfix hasn’t been installed:
- Update the initial congestion window settings and switch to the custom template
First set the initial congestion window in the custom template:
Then tell Windows to use the custom template instead of the standard internet one:
- Your server should now be running with the new initcwnd value, so pull out your favourite packet sniffer - Wireshark, tcpdump etc., and test.
So far I’ve only tested this configuration on an EC2 instance and haven’t deployed it in live production environment yet.
Cursory performance tests show a great improvement downloading the default welcome.png that comes with IIS 7.5 - from 11.7s to 2.5s with a server in Singapore and a client in the UK.
I’m not sure I quite believe the 11.7s time so over the next week I’ll try some more tests with various size files and post the results.
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
If you’re thinking of deploying the fix to a production server it’s probably worth reading the proposal submitted to the IETF on increasing the default value to 10 as it covers both the advantages and potential drawbacks with an increased default.
Jim Gettys also points out some of the potential issues particularly in relation to the possible effects on network equipment.