TCP/IP RWIN Auto-Tuning can slow down network
24 April 2007 by Snakefoot | Comment » | Trackback OffThe 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.
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
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.
Note one can disable the autotunning completely, and lock the RWIN to 65536 bytes:netsh interface tcp set global autotuninglevel=highlyrestricted
More Info MS KB929868netsh interface tcp set global autotuninglevel=disabled
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
Tags:
Category:
Updated: 26 July 2012