Information on 'Tweaking' your TCP stack
Windows optimizations for broadband connections (RWIN)... By TolunayThe 60 second solution (95/98/NT/2k). 0. If you are concerned, backup your registry, so you can return it to its original state! 1. Refer to this table:2. click right-button over the "large" one for your version of windows, and save it to your desktop 3. close your browser, find the icon on your desktop, and double-click it, to import it into your registry.
|
The do-it-yourself solution (ALL Windows OS) Check out Registry 101, for a walk through in finding and modifying or adding the DefaultRcvWindow key yourself. If you like, download one or more of the files below, save them to a directory, and open them in NotePad. In each file is a key and value, that you can update yourself using the Registry 101 steps. |
The longer description for the curious and the technicalTCP/IP is the protocol for you use most when communicating on the net. Tuning TCP/IP therefore has the greatest results on actual speed.
The most significant parameter for TCP/IP tuning is the TCP Receive Window (RWIN). Most other tuning attempts usually do little or no benefit and may actually cripple proper TCP/IP connectivity as exemplified by so called MTUTweak programs that aim to optimize the line for dial-up use. If you have previously used one of these programs, I suggest you remove the registry changes done by them. Typically, these programs lower your MTU (maximum transmission unit) to 576, reduce TCP Window Size to as low as 2144 (an absolute no no for broadband connections), Disable Path Maximum MTU discovery (when this is diabled windows uses an MTU=576). After cleanup download one of the following registry files and double-click to import it to the registry. You must reboot to get registry changes effective. Note that except Window 2000 the default for RWIN for Windows family is ~8KB. Windows 2000 uses ~16KB as default RWIN. * For Windows 95 with Winsock 2.0 or DUN 1.2/1.3 update use Windows 98 registry files ** Windows 95 (without Winsock or DUN update) or NT does not support RWIN > 65535. *** Use a user account with administrative permissions to be able to change registry The chart below shows you the various optimal sizes for DefaultRcvWindow, depending on your line speed, and your Ping time, as calculated as the average of ping for large (say, 1400 byte) packets, and ping for small (default ping) packets.
Read off your DOWNLOAD line speed to the left, and across the top, the average ping time calculation for the servers you typically talk to. Colors indicate where the default setup of Windows 95/98 or NT is not sufficient.
Line Speed | Bandwidth Delay Estimate | | 10ms | 50ms | 100ms | 150ms | 200ms | 300ms | 500ms | 128kbit | 160 | 800 | 1600 | 2400 | 3200 | 4800 | 8000 | 512kbit | 640 | 3200 | 6400 | 9600 | 12800 | 19200 | 32000 | 1024kbit | 1280 | 6400 | 12800 | 19200 | 25600 | 38400 | 64000 | 3000kbit | 3750 | 18750 | 37500 | 56250 | 75000 | 112500 | 187500 | 6000kbit | 7500 | 37500 | 75000 | 112500 | 150000 | 225000 | 375000 | 9000kbit | 11250 | 56250 | 112500 | 168750 | 225000 | 337500 | 562500 | 18000kbit | 22500 | 112500 | 225000 | 337500 | 450000 | 675000 | 1125000 | this | =Large TCP Window Required |
Experiment with different RWIN to find the best setting for your connections. Remember to reboot after each change and test with a site that is typical site that is 10-15 hops away as RWIN depends both on bandwidth and latency characteristic of the line. Making RWIN too large may reduce throughput especially on a line experiencing packet loss. When the line is experiencing significant packet loss RWIN may need to be reduced even further. This is because smaller RWIN size allows for faster recovery of lost packets. If you would like to customize the window better please read "How Large Should the TCP Receive Window be?" section first. Then edit the registry file maching your OS using a text editor such as Notepad and do the following customizations: Windows 95: Find the following line and substitute RWIN for xxxxxxxx as 8 digit hexadecimal number. You may use Windows Calculator (in scientific mode) to convert decimal number to hexadecimal number. Remember to prepend 0's to make value 8 digits long. "DefaultRcvWindow"=dword:xxxxxxxx Windows 98: Find the following line and substitute RWIN for nnnn as a decimal number. "DefaultRcvWindow"="nnnn" Windows NT/Windows 2000: Find the following line and substitute RWIN for xxxxxxxx as 8 digit hexadecimal number. You may use Windows Calculator (in scientific mode) to convert decimal number to hexadecimal number. Remember to prepend 0's to make value 8 digits long. "TcpWindowSize"=dword:xxxxxxxx |