Windows 2k/XP Registry Tweaks2001-03-31 (updated: 2015-04-06) by Philip
Tags: AFD, Registry, tweak, TCP/IP, TcpMaxDupAcks, SackOpts, TTL, TCP Window
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 2000 are still configured with respect to Ethernet rather than high-speed Internet connections, where latency plays a major role in throughput. 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.
Customizing the Windows Registry assumes some proficiency in tuning Windows configuration files. If you don't feel comfortable editing it, please use our TCP Optimizer program, or the Windows 2000/XP registry patches from the Downloads section of the site. both those options will add all the parameters and set all the optimal values in the Registry automatically for you.
If you'd rather make the changes yourself, or prefer to experiment with different values to fine-tune your connection, follow the directions for editing the Registry below.
Editing the Windows 2000/XP Registry
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 most of 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
The value of the TCP Window in the Windows 2k/XP Registry is probably the single most importan setting that will offer the most benefit to improving your internet connection. The recommended value (in red) will optimize TCP for any high speed broadband internet connection. It will work well for most cases, however, if you'd like to use a custom value make sure to follow these guidelines: For best results, the TCPWindow should be a multiple of MSS (Maximum Segment Size). MSS is generally MTU - 40 (20 byte TCP and 20 byte IP headers), where MTU (Maximum Transmission Unit) is the largest packet size that can be transmitted. MTU is usually 1500 bytes (1492 for PPPoE connections). To determine the exact MTU value of your ISP, check out the Advanced Registry Editing section of our site or use the TCP Optimizer.
There are three places in the Windows Registry where you can add the TCP Window parameter.
TcpWindowSize can also exist under TcpipParametersInterface - if added at this location, it overrides the global setting for this particular NIC.
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 is a necessary setting in order to enable Large TCP Window support as described in RFC 1323. Without this parameter, the TCP Window is limited to 64K.
DefaultTTL determines the time in seconds and the number of hops a packet lives (every hop reduces it by at least 1). 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 be unable to reach distant servers at all.
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: setting is different than our Windows 9x recommendation
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 at 0 (False).
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.
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.
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
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.
Note: For Windows XP PPPoE, there is an additional location for MTU that might need to be adjusted (to 1480, or up to 1492 as per the PPPoE specs), depending on the PPPoE software you use. Check the following location in the Registry:
Afd.sys is the kernel-mode driver used to support Windows Sockets applications.
The number of receive bytes that AFD buffers on a connection before imposing flow control. For some applications, a larger value here may give a sligtly better performance at the expense of increased resource utilization. Applications can modify this value on a per-socket basis.
Same as the above setting for the send side of connections.
MS Windows supports a fast I/O path which is utilized when sending "small" datagrams (packets). The default setting for what is considered "small" datagram is 1024 bytes; increasing this value to match your network MTU (normally 1500) can significantly improve network performance.
To adjust this parameter:
Note: setting not in the current version of the TCP Optimizer.
When an application posts a receive with a buffer that is smaller than the current packet being buffered by Winsock, AFD can either make an additional copy of the packet and then copy data to the application buffers directly (two-stage copy because application buffers cannot be accessed directly under the lock), or it can lock and map application buffers and copy data once. This value represents a compromise between extra code execution for data copying, and extra code execution in the I/O subsystem and memory manager. To adjust this parameter:
Setting this parameter to 1 causes Afd.sys to treat all incoming packets as though the push bit was set. We recommend leaving this at the default of 0 (disabled).
According to the HTTP specs, only limited number of simultaneous connections are allowed, while loading pages. To increase that number in Internet Explorer, you can add the following entries to the Registry (they are not present by default). For Firefox, refer to our browser tweaks article.
Notes: Keep in mind that increasing those values exceeds the HTTP specs. Increasing them much over 10 may cause problems with some websites. While these entries might improve web page loading considerably, they tend to strain webservers more and have no effect on throughput.
Alternatively, you can download a patch (sguide_webtweak_2k) that will add these entries for you automatically from the Downloads section of our site.