dslreports logo
 
    «« My IP is Whois Calculator Tool Points
spc

Information on 'Tweaking' your TCP stack


Jump to topic :

Windows optimizations for broadband connections (RWIN).

.. By Tolunay
The 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:
OS Large (64KB)
Windows 95 (old 95) rwin95-l.reg
Windows 98 (updated 95*) rwin98-l.reg
Windows NT*** rwinnt-l.reg
Windows 2000*** rwin2k-l.reg
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 technical

TCP/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.

OS Small (16KB) Medium (32KB) Large (64KB) Huge (128KB)
Windows 95* rwin95-s.reg rwin95-m.reg rwin95-l.reg N/A**
Windows 98* rwin98-s.reg rwin98-m.reg rwin98-l.reg rwin98-h.reg
Windows NT*** rwinnt-s.reg rwinnt-m.reg rwinnt-l.reg N/A**
Windows 2000*** rwin2k-s.reg rwin2k-m.reg rwin2k-l.reg rwin2k-h.reg

* 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
10ms50ms100ms150ms200ms300ms500ms
128kbit16080016002400320048008000
512kbit640320064009600128001920032000
1024kbit128064001280019200256003840064000
3000kbit375018750375005625075000112500187500
6000kbit75003750075000112500150000225000375000
9000kbit1125056250112500168750225000337500562500
18000kbit225001125002250003375004500006750001125000
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