SP4 enhancements make it easy to boost RAS TCP/IP performance

In "Optimizing NT RAS," May 1998, I discussed how Windows NT's default Maximum Transmission Unit (MTU) size affects IP-based RAS connections' performance and how you can modify this value to optimize the performance of slow IP-based RAS connections (e.g., analog modems). This month, I explore the NT Service Pack 4 (SP4) Registry enhancements that provide new and interesting ways to implement my original solutions.

MTU specifies in bytes the maximum IP packet transmission size, which the TCP/IP protocol stack assigns to each adapter based on the type of media in use. For example, a 10Mbps Ethernet adapter uses a default MTU of 1500 bytes, whereas a 16Mbps Token-Ring adapter uses a default MTU of 17,914 bytes. However, faster network types don't necessarily mean higher default MTUs. The default MTU of both PPP-based RAS adapters and Ethernet adapters is 1500 bytes. This default setting can adversely affect performance because RAS PPP connections are usually much slower than Ethernet connections. As a result, RAS PPP connections often use an MTU size that is larger than the optimal size for the link speed involved and results in packet fragmentation, which can degrade performance and affect functionality.

One solution is to disable Path MTU (PMTU) discovery, which automatically attempts to determine the greatest-common-denominator MTU that all routers between two hosts support. When you disable PMTU discovery by changing the value of the HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\ Services\Tcpip\Parameters\ EnablePMTUDiscovery Registry key to 0, you force NT to use a small MTU size (i.e., 576 bytes) for RAS PPP connections. Unfortunately, this modification sets the MTU size for all adapters using IP, rather than just the RAS PPP adapters. Thus, this modification degrades the performance of high-speed network adapters that would otherwise benefit from the larger MTU sizes that PMTU discovery provides.

Fortunately, SP4 lets you apply MTU-tweaking methodology in a more granular fashion. In SP4, Microsoft introduced two new RAS-specific MTU Registry values that let you hard-code the MTU value for RAS PPP and PPTP-based connections. The IPMTU Registry key (type REG_DWORD, data range of 1 to 1500, default value of 1500) lets you modify the MTU on RAS PPP connections, and the TunnelMTU key (type REG_DWORD, data range of 1 to 1500, default value of 1400) lets you modify the MTU on PPTP connections. You can create these keys on only SP4-enabled systems under the Parameters subkey of the appropriate NDISWANx adapter entry (e.g., HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Services\NdisWan\ Parameters).

When you change these values to settings that are more appropriate for the connection speed involved (e.g., an IPMTU setting of 576 bytes for a slower PPP Internet connection), you'll notice appreciable differences in your RAS client's performance. In addition, using this method to modify MTU values doesn't adversely affect the performance of your LAN adapters that thrive on higher MTU sizes.

However, this method doesn't solve all MTU-related RAS problems, particularly PPTP-based connection problems. PPTP RAS connections maintain MTUs that are distinct from normal PPP-based RAS connection MTUs. Thus, PPTP sessions suffer from maladies, such as slow performance and connections that hang or terminate. For more information about these problems, see the Microsoft article "RAS Uses Fixed TCP/IP MTU Size" at http://support.microsoft.com/ support/kb/articles/q183/2/29.asp.

You can use several cool utilities to monitor and manage your RAS connections' MTU sizes and other TCP/IP parameters, such as the Maximum Segment Size (MSS—the MTU value minus the IP overhead of 40 bytes) and the TCP sliding window size (the amount of data that the sending host can transfer to the receiving host before the sending host requires an ACK from the receiver). For example, iSpeed from High Mountain Software (http://www.hms.com), TweakDUN from Patterson Design Systems (http://www.pattersondesigns.com), and Mike Sutherland's MTUSpeed (http://www.mjs.u-net.com/ mtuspeed.htm) not only let you view and modify RAS and TCP/IP-related performance parameters but also let you test the results of each modification to determine the optimal setting for a particular connection.