TCP/IP RWIN Auto-Tuning can slow down network

24 April 2007 by Snakefoot | Comment » | Trackback Off
The network protocol stack has been rewritten in Windows Vista, so it will be even better at adapting to high performance network connections. It is no longer possible to specify a custom size for the TCP/IP Receive Window (RWIN) with the new auto tuning feature (Unless the application it self uses SO_RCVBUF).

Vista enables Receive Window Scaling by default and when performing the handshake, then it uses a RWIN of 256 bytes with a scale factor of 8 (256^2*8=64K bytes). This allows the RWIN to reach the size of 16,776,960 bytes.

Sadly enough not all routers and servers looks at the scale factor, and instead of negotiating a RWIN of 65536 bytes then it is only uses 256 bytes. This causes a very slow start or that the connection is dropped completely.

It possible to change the way it automatically tune the RWIN, so it will use a RWIN of 16,384 bytes with a scale factor of 2 (16384^2*2=64K bytes). This allows the RWIN to reach the size of 262,140 bytes.

netsh interface tcp set global autotuninglevel=highlyrestricted

Note one can disable the autotunning completely, and lock the RWIN to 65536 bytes:

netsh interface tcp set global autotuninglevel=disabled

More Info MS KB929868
More Info MS KB932170
More Info MS KB935400
More Info MSDN - WSAIoctl function controls the mode of a socket
More Info The Cable Guy - TCP Receive Window Auto-Tuning
More Info The Cable Guy - Next Generation TCP/IP Stack

Related Enable auto-tuning of RWIN in Internet Explorer

Credits www.petri.co.il

Updated: 2 October 2008

Comments:

Comment by dpsubi1 - 20 November 2007 @ 6:15 Reply

Great tips. It helped me a lot.

My broadband speed is increased very much.

Thanks

Leave a comment


NB! Use the Forum for computer help and off-topic questions.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>