Improve TCP/IP performance in W2K registry
Published: 08 Oct 2002 14:24 BST
Windows 2000 Server's TCP/IP Properties Sheet is a little deceptive in giving the impression that basic information, such as an IP address, subnet mask, default gateway, or DNS server, is all that's required to create connections. There's much more to TCP/IP than meets the eye; Windows simply requires a minimal amount of operator input and then establishes a TCP/IP connection based on that information and several preset options.
Unfortunately, an easy configuration doesn't always equal optimal performance. I'm going to show you various registry keys you can modify to increase TCP/IP performance on a Windows 2000 Server.
DANGER! Modifying the registry is dangerous. Making an incorrect registry change can destroy Windows and/or your applications. Likewise, changing the TCP/IP registry keys can sometimes have an adverse effect on performance. Make a full system backup before you try any of the techniques described in this article. If you decide to tweak TCP/IP, you should make one change at a time (unless otherwise noted). Get a feel for the change that you've made before making any other changes. Some of the registry keys that I'll be showing you can have a rather dramatic effect when changed. To gain optimum results from the changes, you should make them to all of the servers and workstations on your network.
Adjusting the Maximum Transmission Unit size
Of all the registry tweaks that I've found for TCP/IP, perhaps the most useful is the ability to adjust the Maximum Transmission Unit (MTU) size. MTU size dictates the maximum packet size (in bytes) that the TCP/IP transport will attempt to transmit over the underlying network. Networks that use Internet Connection Sharing (ICS) or Point-to-Point Protocol over Ethernet (PPPoE) for their broadband connections must have an MTU size of 1,492 or lower to run efficiently.
An incorrect MTU size can make your network run slowly. Administrators tend to dismiss this problem as low bandwidth on the ISP's end, and that might be a source of the problem. But you'd be surprised at the difference an MTU adjustment can make.
The MTU is such a factor because, by default, Windows 2000 and Windows XP set the MTU size to 1,500. It's been my experience that if a network is running slowly, even the 1,492 value I mentioned earlier is too high. I usually have the best luck by setting the MTU to around 1,454.
You can check the MTU size for your environment by opening a command prompt on your administration workstation and typing
PING -F -I [MTUsize] [gateway]
where MTUsize is the size you want to experiment with and gateway is the gateway of your network. Start out by using an MTU size of 1,454. Doing so will make the command look something like this:
PING -F -I 1454 147.100.100.50
When you enter the command, the PING will either be successful or it will fail with a message stating that the data must be fragmented. If you receive the error message, decrease the MTU value and keep trying until you find a value that works. If the PING command works the first time, try incrementing the value by five or 10 until you see the error message. You can then narrow down to the appropriate value.
Once you've discovered an MTU size that works, the next trick is to embed the value into the registry. The key's actual location within the registry varies depending on the version of Windows you're using. If you're using Windows NT, the MTU key is located at:
HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Services\Parameters\Tcpip
If you're using Windows 2000 or higher, the MTU key is located at:
HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Services\Tcpip\Parameters\
Interfaces\adapter ID
There's a good chance that the MTU key doesn't presently exist in your system and that you'll have to create it at the specified location. To do so, open the Registry Editor and create a new DWORD value called MTU. The minimum value for this key is 68, and the maximum value is the MTU for the underlying network.






