Cable Modems & xDSL Registry Tweaks
Different Network protocols benefit from different Network settings in the Windows Registry. For example, the Internet "standard" for MTU is 576, for Ethernet it's 1500. The optimal TCP settings for Cable Modems and xDSL seem to be different than the default, set in Windows. Windows 9x is basically optimized for Ethernet, which is a high speed low latency connection, however that isn't the case on the Internet.
Here, you will find OS specific information on how to optimize the Registry for Cable Modems or xDSL, which assumes some proficiency in customizing Windows.
Registry tweaks for Windows
9x, Millennium & NT
To edit the Registry, you need to use an editor, such as Regedit. It can be accessed from the Start Menu ( START > Run > type "Regedit" ). Note that most of the values listed here are not present by default and you might have to add them manually. Also, these Registry changes take effect after you Reboot.
Recommended settings for Windows
98 / 98SE / Windows ME
Windows 98 and later versions have some improvements in the TCP/IP, including Large Window support as described in RFC1323 ( the 'DefaultRcvWindow' has a maximum value of 2**30 rather than 64K), support for Selective Acknowledgments (SACK) and support for Fast Retransmission and Fast Recovery. The Registry setting you should implement are listed below, with the recommended value posted in RED.
HKEY_LOCAL_MACHINE\
System\CurrentControlSet\Services\Class\NetTrans\000n
(Where "000n" is your TCP/IP protocol. It contains "TCP/IP" assigned
to the "DriverDesc" value. "n" can be any number from 0 to 9)
MaxMTU="1500" (string var) Note:
If you're using DSL and your ISP has implemented PPPoE, you must set MaxMTU
to 1492 or less.
HKEY_LOCAL_MACHINE\
System\CurrentControlSet\Services\VxD\MSTCP
DefaultRcvWindow="256960" (string var,
the maximum value of this setting is 2^30, or 1Gb in Windows 98/98SE/ME).
Note: For best results RWIN has to be a multiple of MSS (MaxMTU-40)
lower than 65535 times a scale factor that's a power of 2, i.e. 44 x 1460
= 64240 x 2^2 = 256960. If you choose to use a RWIN lower than 65535, you
can simply make it multiple of MSS and turn scaling off (Tcp1323Opts=0)
DefaultTTL="64" (string var, range 1-255,
use any number between 32 and 128)
PMTUDiscovery="1" (string var, boolean,
0-false or 1-true. Many connections perform better with this entry
at 1, however, if you prefer to set your upstream to send fixed 1500 packets,
you might want to use 0 instead). When set at 1, establishing connections
and initial transfer speed might slow down a bit, however you will get
better throughput if somewhere in the path large packets need to be fragmented.
PMTUBlackHoleDetect="0" (string var,
zero for optimal performance)
Tcp1323Opts="1" (string var,
recommended setting is 1. The possible settings are 0 - No Windowscaling
and Timestamp Options, 1 - Window scaling but no Timestamp options, 3 -
Window scaling and Time stamp options.) The value is documented in RFC
1323
Note: According to Microsoft, Tcp1323Opts should be DWORD, rather than
a string value, however seems that the documentation is wrong, and a string
value is necessary to enable large RWIN values.
SackOpts="1" (string var, recommended setting is 1. Possible settings are 0 - No Sack options or 1 - Sack Option enabled) Selective Acknowledgements, as documented in RFC 2018
HKEY_LOCAL_MACHINE\
System\CurrentControlSet\Services\VXD\MSTCP\Parameters
MaxDupAcks="2" (DWORD decimal var,
taking integer values from 2 to N. Recommended setting is 2)
Recommended Registry Settings
for Windows 95
According to Microsoft, the WinSock 2 update for Windows 95 supports
TCP large windows and time stamps, which means you could use the Windows
98 recommendations if you update the original Windows Socket to version
2.
Windows
Socket 2 update for Windows 95 - bug fixes from earlier implementations
as well as some performance enhancements. Downloading the Winsock 2 update
will allow you to add the Windows 98 entries as well.
Here are the recommended settings supported by the original and the updated versions of Winsock.
HKEY_LOCAL_MACHINE\
System\CurrentControlSet\Services\Class\NetTrans\000n
(Where "000n" is your TCP/IP protocol. It contains "TCP/IP" assigned
to the "DriverDesc" Value)
MaxMTU="1500" (string var) Note:
If you're using DSL and your ISP has implemented PPPoE, you should set
MaxMTU to 1492 or less.
HKEY_LOCAL_MACHINE\
System\CurrentControlSet\Services\VxD\MSTCP
DefaultRcvWindow="64240" (DWORD decimal
var, or string var, has to be a multiple of MSS for best results, i.e.
(MaxMTU-40) x number... The range of this setting Windows 95 is range 0-65535.
Best settings to try with MSS=1460 are 64240, 46720, 23360 and 11680, in
that order)
DefaultTTL="64" (string var, range
1-255, use any number between 32 and 128)
PMTUDiscovery="1" (string var, boolean,
0-false or 1-true. Many connections perform better with this entry
at 1, however, if you prefer to set your upstream to send fixed 1500 packets,
you might want to use 0 instead). When set at 1, establishing connections
and initial transfer speed might slow down a bit, however you will get
better throughput if somewhere in the path large packets need to be fragmented.
PMTUBlackHoleDetect="0" (DWORD decimal var, zero for optimal performance)
Windows NT 4 Registry Tweaks
Windows NT is slightly different in handling TCP/IP than Windows 9x. Keep in mind that even if you apply the Windows NT tweaks, you'll see smaller performance increase than with Windows 9x, simply because NT is better optimized for networking. I strongly recommend backing up your Registry before applying these settings.
HKEY_LOCAL_MACHINE\
SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
"TcpWindowSize"="64240" (DWORD
decimal var, range 0-65535. It has to be a multiple of MSS for best results,
i.e. (MaxMTU-40) x number... Recommended settings to try are 64240,
32120 and 8760 , in that order)
DefaultTTL="64" (DWORD decimal
var, range 1-255, use any number between 32 and 128 )
EnablePMTUDiscovery="1" (DWORD
decimal var, boolean, 0-false or 1-true. Many connections perform better
with this entry at 1, however, if you prefer to set your upstream
to send fixed 1500 packets, you might want to use 0 instead). When set
at 1, establishing connections and initial transfer speed might slow down
a bit, however you will get better throughput if somewhere in the path
large packets need to be fragmented.
EnablePMTUBHDetect="0" (DWORD decimal var, boolean, 0-false or 1-true. Set to 1 if you decide to set "EnablePMTUDiscovery" to 1)
HKEY_LOCAL_MACHINE
\SYSTEM\CurrentControlSet\Services\<Adapter
Name>\Parameters\Tcpip
MTU="1500" (DWORD decimal var,
Range 68 - <Value of the Network>. Values larger than the default for
the underlying network will result in the transport using the network default
MTU) Note: If you're using DSL and your ISP has implemented PPPoE, you
should set MaxMTU to 1492 or less.
Windows 2000 & Windows XP
Windows 2000 and XP are built on NT technology and both are generally
better optimized for networking than Windows 9x and even NT4. Regardless,
both
XP and Windows 2000 are still configured with respect to Ethernet
rather than high speed Internet connections. Here, you will find specific
information on
how to optimize the Windows 2000/XP Registry for Cable Modems, DSL,
or any similar type of broadband Internet connection.
To edit the Registry, you need to use an editor, such as Regedit. As
with previous Windows versions, it can be accessed from the Start Menu
( START >
Run > type "Regedit" ). Note that most of the values recommended on
these pages are not present in the Registry by default and you might have
to add
them manually. Also, for the tweaks to take effect you must Reboot.
It is strongly recommended that you backup your Registry before editing.
The easiest way to backup your Registry is from within the Registry Editor,
just
choose "Export Registry File" from the pull-down menu.
Recommended settings for Windows 2000 /
XP
Windows 2000 & XP, unlike NT supports large windows as described
in RFC1323 ( the 'RcvWindow' has a maximum value of 2**30 rather than 64K),
and
includes some other improvements over its predecessors you can
use to speed up any TCP/IP transfers. The best settings are listed in red,
the descriptions
and other options are added to provide you with better understanding
and enable you to customize your settings.
All the following entries, unless otherwise noted should be placed in the Windows 2000/XP Registry under the key
HKEY_LOCAL_MACHINE\
\SYSTEM
\CurrentControlSet
\Services
\Tcpip
\Parameters
TCPWindowSize
The value of TCP Window in the Windows 2000 Registry is DWORD, representing
number of bytes, with range from 0 to 2^30. The recommended values (in
red) optimize TCP for any high speed Internet connection and work best
in most cases, however if you'd like to use a custom value follow these
guidelines:
For best results, the TCPWindow should be a multiple of MSS (Maximum Segment
Size). MSS is generally MTU - 40, where MTU (Maximum Transmission Unit)
is the largest packet size that can be transmitted. MTU is usually 1500
(1492 for PPPoE connections). To determine the MTU value of your ISP, check
out
the Advanced Registry Editing section of our site.
There are three places in the Windows 2000 Registry where you can add the TCP Window parameter.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
GlobalMaxTcpWindowSize="256960" (DWORD, number of bytes) Valid range is
from MSS to 2^30. Add the value as a decimal.
Note: For best results RWIN has to be a multiple of MSS lower than 65535
times a scale factor that's a power of 2, i.e. 44 x 1460 = 64240 x 2^2
= 256960.
If you choose to use a RWIN lower than 65535, you can simply make it multiple
of MSS and turn scaling off (Tcp1323Opts=0)
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
TcpWindowSize="256960" (DWORD, number of bytes) Valid range is from MSS
to 2^30. Add the value as a decimal. TcpWindowSize can also exist
under
\Tcpip\Parameters\Interface\<interface> - if added at this location,
it overrides the global setting for this particular <interface>.
Note (10/20/00): Seems MS has found another bug in Windows 2000, the TCPWindowSize
should be configured with the global setting
(GlobalMaxTcpWindowsSize) rather than this one - Q263088
Note: For best results RWIN has to be a multiple of MSS lower than 65535
times a scale factor that's a power of 2, i.e. 44 x 1460 = 64240 x 2^2
= 256960.
If you choose to use a RWIN lower than 65535, you can simply make it multiple
of MSS and turn scaling off (Tcp1323Opts=0)
Tcp1323Opts
Tcp1323Opts is a necessary setting in order to enable Large TCPWindow support
as described in RFC 1323. Without this parameter, the TCPWindow is
limited to 64K.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
Tcp1323Opts="1" (DWORD, recommended setting is 1. The possible settings
are 0 - Disable RFC 1323 options, 1 - Window scaling but no Timestamp
options, 3 - Window scaling and Time stamp options.)
Note: Tcp1323Opts="3" might help in some cases where there is increased
packet loss, however generally you'll achieve better throughput with
Tcp1323Opts="1", since Timestamps add 12 bytes to the header of each packet.
DefaultTTL
DefaultTTL determines the time in seconds and the number of hops a packet
lives. While it does not directly affect speed, a larger value increases
the
amount of time it takes for a packet to be considered lost, discarded and
retransmitted. A value that's too small can cause packets to distant servers
not
to reach their destination at all.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
DefaultTTL="64" (DWORD, recommended setting is 64. Other settings that
are widely used are 128 and 32)
EnablePMTUDiscovery
When set to 1 (True), TCP attempts to discover MTU automatically
over the path to a remote host. Setting this parameter to 0 causes MTU
to default to
576 which reduces overall performance over high speed connections. Note
that this setting is different than our Windows 9x recommendation.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
EnablePMTUDiscovery="1" (DWORD - boolean, valid settings are 0-->False
and 1-->True. Many connections perform better with this entry at
1,
however, if you prefer to set your upstream to send fixed 1500 packets,
you might want to use 0 instead). When set at 1, establishing connections
and
initial transfer speed might slow down a bit, however you will get better
throughput if somewhere in the path large packets need to be fragmented.
EnablePMTUBHDetect
Setting this parameter to 1 (True) enables "black hole" routers to be detected,
however it also increases the maximum number of retransmissions for a given
segment. In most cases you'd want to keep BHDetect to 0 (False).
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
EnablePMTUBHDetect="0" (DWORD - boolean, valid settings are 0-->False and
1-->True. Recommended setting is 0)
SackOpts
This parameter controls whether or not SACK (Selective Acknowledgement)
support is enabled, as specified in RFC 2018. SACK is especially important
for
connections using large TCP Window sizes.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
SackOpts="1" (DWORD - boolean, recommended setting is 1. Possible settings
are 0 - No Sack options or 1 - Sack Option enabled).
TcpMaxDupAcks
This parameter determines the number of duplicate ACKs that must be received
for the same sequence number of sent data before "fast retransmit" is
triggered to resend the segment that has been dropped in transit.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
TcpMaxDupAcks="2" (DWORD - range 1-3, recommended setting is 2).
Additional TCP/IP Related Parameters
The additional TCP related parameters are not necessary in most cases,
and you shouldn't expect any drastic improvements, however we added them
for
those of you who like experimenting. You might be able to gain that last
bit of performance, or customize your TCP/IP behavior even more with those.
Keep
in mind you should familiarize yourself with what the parameters mean and
how they affect your connection before changing their values
MTU
Setting MTU overrides the default MTU for the network interface it is added
to. Note that if EnablePMTUDiscovery is set to 1, TCP will use the smaller
value
of this local MTU and the "Discovered" MTU of the underlying network connection.
If you'd rather use only the MTU value specified here, you'd have to
disable PMTUDiscovery, which would prevent your system from detecting the
network MTU.
HKLM\SYSTEM\CurrentControlSet\Services
\Tcpip\Parameters\Interfaces\<interface>
MTU="1500" (DWORD, valid range is from 68 to <MTU of network>).
Windows 2000 Web Patch
According to the HTTP specs, only limited number of simultaneous connections
are allowed, while loading pages. To increase that number, you can add
the
following entries to the Registry (they are not present by default):
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\
"MaxConnectionsPerServer"=dword:00000020
"MaxConnectionsPer1_0Server"=dword:00000020
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\
"MaxConnectionsPerServer"=dword:00000020
"MaxConnectionsPer1_0Server"=dword:00000020
Note: Keep in mind that although those values work fine in most cases,
they exceed the HTTP specs and therefore might cause problems with some
websites. If you experience problems, just remove the entries. While these
entries might improve web page loading considerably, they tend to strain
webservers more and have no effect on throughput.