TCP Optimizer Help
This documentation is for version 2.x and 3.x of the TCP Optimizer under Windows XP/2000/2003. See the TCP Optimizer 4 Documentaton for Windows versions 7, 8, 2012, 10. Please also see the TCP Optimizer FAQ for answers to frequently asked questions.
Table of Contents
The TCP Optimizer is a program designed to provide an easy, intuitive interface for tuning TCP and IP related parameters in the Windows Registry. It takes into account all related RFCs, the Microsoft TCP/IP implementation oddities, verifies all Registry locations for the same TCP/IP parameters (ICS Sharing, AOL protocol MTU, etc), only ads the necessary Registry parameters, and overall aids in making the whole "tweaking for speed" experience a breeze. It is downloadable from here: SG TCP Optimizer.
In the following chapters, you will find short descriptions of all the settings and all aspects of the functionality of the TCP Optimizer. In addition to this documentation, you can also check the TCP Optimizer FAQ, as well as the SG Tweaking forum. We'd also appreciate any feedback about the program, please contact the webmaster or post in our forums with any suggestions for additions or changes to either the program or this documentation.
If you do not feel like reading the entire documentation below, or you simply need the tweaks NOW, without spending time in learning the meaning of all those settings, you can use the Optimizer by following these short instructions:
The Optimizer can do all the rest for you (including a backup of the current registry settings, so you can revert the changes if you wish). The new version of the program includes a preview of all changes after hitting the "Apply changes" button and before actually editing the Windows Registry.
You can also use the Optimizer to easily apply custom values, test with different settings, and learn a bit more about tweaking and TCP/IP in general. We strongly recommend getting familiar with the settings, and learning what aspects of your connection they affect first. Also, note that some of the program tabs (Largest MTU, BDP, Latency) can be used as a learning tool without making any changes to the Windows Registry.
The 3 radio buttons at the bottom of the program show the relevant "Current settings" as set in the Windows Registry, the Optimizer recommended "Optimal settings", or allow for "Custom settings" for the more advanced user to test with different values.
Please see the following chapters for definitions and detailed descriptions of all options in the TCP Optimizer.
Note: You should be logged in with an account with administrative privileges to be able to write to some of the Registry keys and use the program to its full potential.
This tab contains all the important tweakable TCP/IP parameters.
Connection Speed (in kilobits per second) - you have to choose your maximum available bandwidth here. The Optimizer will base any "Optimal settings" recommendations on the connection speed you choose in this slider bar. Please note it is an approximation of your maximum available bandwidth, it does not have to be exact.
Network Adapter selection - you should have a list of all present network interfaces in the system. When you select an adapter, using this pull-down menu, its IP address will be shown in the lower-right of this section. Note you can also choose to modify all network adapters at the same time, or tweak without modifying any of their settings.
You also have the option to type a a custom MTU value (that will be used to recommend RWIN). Generally, MTU can safely be set at 1500, however some types of connections, and some routers use smaller values. It is only necessary to edit the MTU value in such special cases. For example, the maximum MTU value for Windows XP PPPoE encapsulation is 1480 (even though other PPPoE implementations can use as high as 1492).
Note: In some rare cases, it is possible that your desired network device is not correctly identified by the Optimizer. That does not affect the program performance much, and you should simply choose "Modify All Network Adapters" in such cases. We'd also appreciate you contacting us with the exact device, so we can improve the program.
TCP Receive Window (a.k.a. RWIN) - this buffer is the single most important factor in tweaking your TCP/IP parameters. A small RWIN value limits your maximum throughput (the server waits for acknowledgements of received packets), one much larger than needed by your connection can have a negative effect on your connection as well. Here is some history on RWIN, and all the considerations in choosing an "optimal" value:
Originally, when the TCP protocol was developed, there were only 16 bits in the TCP header reserved for the size of this buffer, allowing for a maximum value of 2^16 (65535, if you start counting from 0). With faster high-latency networks this value proved insufficient, and RFC 1323 introduced additional "TCP Options", allowing for larger RWIN values. It is accomplished by bit shifting, or multiplying the original unscaled RWIN value (up to 65535 bytes) in the TCP header by a scale factor, power of 2.
The TCP Optimizer recommends an optimal TCP Window value considering all the following factors:
- Bandwidth * Delay product based on the chosen maximum connection speed and
maximum anticipated latency.
MTU Discovery (RFC 1191, EnablePMTUDiscovery) - We recommend enabling (choosing "Yes") this setting.
Black Hole Detect (EnablePMTUBHDetect) - The recommended optimal
setting in the TCP Optimizer is "No".
Selective ACKs (SackOpts) - the recommended setting is "Yes".
Max Duplicate ACKs (TcpMaxDupAcks) - range is 1-3, the recommended
value is 2.
Time to Live (TTL, DefaultTTL) - recommended value is 64.
TCP 1323 Options (TCP1323Opts) - we recommend having only "Window
This tab contains additional tweaks, that have a smaller, but still noticeable effect on TCP/IP performance. Generally, the tweaks on this page are not directly related to throughput. Some of the tweaks in this section of the Optimizer might be related only to specific aspects of networking, such as Web, or LAN browsing, hostname resolution speed, etc.
Internet Explorer Optimization
Host Resolution Priority
Type/Quality of Service
QoS is enabled by default in Windows XP, and can limit available bandwidth in order to accommodate high-priority traffic, when present. The Optimizer only changes the QoS value if it is already present in the registry. It is in the Registry only if the QoS Packet Scheduler is installed (can be added from the Network Adapter Properties). We recommend having the QoS Packet Scheduler uninstalled, or/and setting the QoS: NonBestEffortLimit Optimizer setting to 0%.
ToS (Type of Service, RFC 791, RFC 1812) is a field of the IP header, designed to also carry quality of service features, such as prioritized delivery for IP datagrams. It is not widely used, and it has been redefined and superseded by a newer standard called Differentiated Services (DiffServ) and defined in RFC 2474 , RFC 2475, RFC 2597, RFC 2598. DiffServ increases the number of definable priority levels by reallocating bits of an IP packet for priority marking. The TCP Optimizer allows for ToS/DiffServ editing, although it is an advanced setting, probably beyond the scope of regular residential broadband tweaking. If you feel comfortable editing this value, you might also want to note possible conflicts with using some ToS values in a DiffServ environment, as described in RFC 2873.
ToS other than 0 is only available if ToS: DisableUserTOSSetting is present, and set to "0" in the Optimizer. If enabled, the ToS: DefaultTOSValue can be set to a specific number, (which is probably beyond the scope of this help file, but is somewhat explained below - feel free to read the related RFCs referenced above for more info). If we must make a recommendation, here are some good DefaultTOSValue numbers that are valid, and with high precedence in both ToS and DiffServ environments:
The tables below explain the ToS and DiffServ values in more detail so you can choose your own numbers
ToS Field in Detail:
Note: The field is 8 bits in the IP header, first 3 define precedence, then one each for delay, throughput, reliability, cost and a checking bit as illustrated by the table above.
DNS Error Caching
Note: Seems Microsoft changed the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters\NegativeCacheTime Registry entry in Windows 2000to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters\MaxNegativeCacheTtl in Windows XP and 2003 server. We have updated this in the 2.02 version of the program.
LAN Browsing speedup (disabling the Network Task Scheduler)
LAN Request Buffer Size (reduces network delay)
5. Largest MTU
This section aids in finding the largest possible non-fragmented packet between your PC, and a server. You can specify an URL, click Start, and have the program ping the specified server with different packet sizes, until it finds the largest possible packet before fragmentation occurs. The largest non-fragmented MTU is important in that it represents the optimal MTU value on that particular path.
A large MTU value helps in maximizing data vs. header size for a particular data segment. Fragmentation and reassembling of packets can cause slowdowns, and introduces more header overhead as well. That is why the largest non-fragmented MTU value for your network connection is a significant factor in tweaking. Once the program finds the largest non-fragmented packet, it can be plugged in the MTU value in the General Settings tab.
Note that for this to work, it is best to set your MTU value to 1500 temporarily, since the largest non-fragmented MTU us also bound by the MTU value on your end.
This section contains a Bandwidth * Delay calculator. The BDP is a very important concept in TCP/IP Networking. It is directly related to the TCP Window (RWIN) value, in that it represents a limit to the possible throughput. BDP plays an especially important role in high-speed / high-latency networks, such as most broadband internet connections. It is one of the most important factors of tweaking TCP in order to tune systems to the type of network used.
The Bandwidth*Delay Product, or BDP for short determines the amount of data
that can be in transit in the network. It is the product of the available
bandwidth and the latency, or RTT.
This section of the program is simply a tool for testing the latency of your network/internet connection. You can choose a number of hosts, a number of pings per host, and ICMP packet size. After clicking start, the tool will consecutively ping all hosts, then provide maximum and average latency measurements in milliseconds, as well as packet loss indication (if present).
This tool can be used to effectively estimate the maximum anticipated latency for BDP/RWIN calculations. In order to do that, we recommend using a larger number of hosts than the default 5, and a larger packet size (since larger packets tend to have a bit higher latency). Then, as an estimate of your maximum anticipated latency, rather than using the Maximum RTT, use the average RTT, multiplied by two.
This section of the Optimizer has been improved to include an actual Registry Editor. It is a direct interface to the Windows Registry, and only intended for advanced use ! Please only use it carefully, and at your own risk.
Note that the Registry editor only includes TCP/IP, and some related hives of the Windows Registry.
To use it, simply navigate to the appropriate key you wish to edit in the left section of the editor, then work in the right section, by either choosing a value/key and editing it, or adding a new one. All available actions for the currently active window/key/value are reachable by right-clicking on them.
The File Pull-down menu contains a number of options for backing up, as well as exporting and importing all the related TCP Optimizer settings. Those options can be shared between users, they contain information about empty keys, values to remove/add/edit and all relevant parameters to clone the exact state of the related settings to another machine, or save them for your own reference later.
The Preferences menu, pictured on the right has two sections. The first one, "Maximum Latency" is a number in milliseconds, that is used in calculating the optimal RWIN value. It affects all the "Optimal settings" recommendations of the program, so if you're not sure what it does, leave it at the default 500ms. Basically, the larger this number, the larger RWIN values the program is going to recommend under "Optimal settings" for the same connection speed, and vice versa.
The second section in the Preferences menu, "Latency tab: hosts to ping" contains a list of URLs, used in the Latency section of the program for measuring current RTT (round trip time, delay, ping, latency) to multiple hosts.
The Help Menu of The Optimizer simply contains a link to this documentation, as well as the Software License Agreement, and some general information about the program.
Appendix A - Program Changes