Boosting Windows 95 TCP Throughput:
Seize The Window Of Opportunity!

Lisa A. Phifer
Core Competence, Inc.
lisa@corecom.com
Originally published by Interop OnLine, August 1997; reposted with permission.

Most network traffic today is conveyed via TCP/IP, the transmission control protocol/internet protocol. Even newbie home users know the terms "IP address" and "hostname," and they've dutifully configured their PCs with an ISP-assigned network mask and domain name.

For many users, understanding of TCP/IP ends here.

Why bother to learn more about TCP and how it really works? Well, how about to boost your network performance? You can do it simply by entering a single additional TCP parameter.

The parameter is default receive window size. Most operating systems allow some way to twiddle this value.

How it works

A TCP connection is probably involved whenever you browse a web site, download a file, or access a remote server application. In most cases, data flows from the server (the sending TCP) to the client (the receiving TCP, which is usually your PC.)

In a TCP connection, the server transmits the data in a series of sends and acknowledgements. That is, the server sends a little bit, awaits the client's acknowledgement, sends a little more, awaits the client's acknowledgement...and so on until the entire transmission is complete.

The amount of data that the server sends before it waits for the client's acknowledgement is referred to as a window. Its purpose is to control the flow of data. Too large a window results in excessive retransmission and network congestion. Too small a window results in suboptimal throughput. The optimum window size is affected by a wide variety of ever-changing factors, including end-to-end network configuration, transmission media, and traffic load. For this reason, TCP implementations continuously adjust window size to reflect current conditions, starting from an initial value determined during TCP connection establishment. This initial value is calculated by the sending TCP, based upon a default receive window size supplied by the receiving TCP.

The challenge is finding the optimum default receive window size for your own network environment. A good default value is key to sustaining the highest rate of throughput. A bad default value can really bog it down. While no one window size works best for everyone, let's look at a few examples...

Consider a typical Intranet environment. Here, client workstations pull data from file, application, or web servers located on the same 10Mbps LAN segment. The theoretical throughput limit in this scenario is 10 million bits per second divided by 8 bits per byte, or 1,250 Kbytes per second. I found TCP throughput to peak around 700 Kbytes per second (5.6 Mbps) when transferring files between two Pentium PCs running Windows 95. Note that performance was abysmal at values of 2,918 bytes or smaller. Reasonable throughput levels were achieved at 2,919 bytes or larger, with peak performance found between 2,944 and 4,096 bytes. When the value was set to 8,192 bytes, the default in an off-the-shelf Windows 95 setup, throughput dropped by 23 percent!

LAN Throughput

Now consider a remote office or other high-speed remote access environment. Here, client PCs access servers located in another subnetwork, connected via a single 64 Kbps ISDN (integrated digital services) B channel. Performance tests conducted during the Strategic Networks 1996 ISDN router and bridge evaluation [link to http://www.snci.com] indicate that larger values yield higher throughput (up to 61.7 Kbps at 24,576 bytes) when transferring files between two subnets connected via ISDN. Since ISDN is digital, data loss is relatively low. But when compared to ethernet, propagation delay is high. Therefore, a larger window size lets more data "fill the pipe" between sender and receiver without incurring much of a retransmission penalty.

ISDN Throughput

Suppose you're a typical telecommuter or home PC user. You have a 28.8 Kbps analog modem for dial access to file and web servers on the public Internet. Your theoretical throughput is limited to 28,800 bits per second divided by 8 bits per byte, or 3.6 Kbytes per second. Just how close can you get to this limit? I managed just under 2.8 Kbytes per second (22.4 Kbps) when transferring files from my ISP's FTP server to my Windows 95 Pentium PC by setting the default value to 24,576 bytes. While it is modest, this is still a 14 percent improvement over the 2.4 Kbytes per second (19.2 Kbps) achieved with the MSTCP default window of 8,192 bytes. This improvement would save you almost five minutes when downloading a 5MB file.

28.8 Modem Throughput

Low-end home users still struggling along with a 14.4 Kbps analog modem won't find any relief here. With a theoretical limit of just 1.8 Kbytes per second, I found throughput to hover around 1 Kbyte per second (8 Kbps) for almost all values tested. Interestingly, I found throughput peaked when the value was set to 2,919 bytes. Why is this value so special? If you assume a maximum transmission unit (MTU) value of 1,500 bytes, 40 bytes of protocol header, and 1,460 bytes of user data, two TCP packets would be used to carry 2,920 bytes. When the value is large enough to allow two full packets to flow across the TCP connection, you get a "pipeline" effect.

14.14 Modem Throughput

How to modify the default value in Windows 95

The default receive window size in Microsoft's MSTCP implementation for Windows 95 is called "DefaultRcvWindow."

Follow these steps to modify this parameter:

  1. Run the Registry Editor (regedit) from the Windows 95 Start Menu.

    Run RegEdit

  2. Back up your existing registry by selecting Export Registry File from the Registry menu. The Registry Editor in Windows 95 does not provide save or undo options, so be careful whenever modifying it.

  3. With the left mouse button, click on the following sequence of registry nodes shown as + (plus) signs in the left side of the Registry Editor window:
    HKEY_LOCAL_MACHINE
    System
    CurrentControlSet
    Services
    VxD
    

  4. Click on the text MSTCP All existing TCP parameters will be displayed in the right side of the Registry Editor window.

    Edit Registry

  5. Check to see whether the DefaultRcvWindow appears in the right window when MSTCP is highlighted. If it doesn't, this TCP parameter has not been customized; the default value of 8,192 bytes is in effect.

  6. If the TCP parameter has not yet been customized, choose Edit/New/StringValue from the menu and enter DefaultRcvWindow as the new field name. This creates the new parameter with a null value.

  7. To modify the current TCP default receive window size, click on DefaultRcvWindow in the right window so that this parameter is highlighted. Choose edit/modify from the menu, enter the desired default TCP receive window size (in bytes) in the value data field, and click on OK. Exit the Registry Editor. You'll need to shut down or restart before this change takes effect.

    Set DefaultRcvWindow

Please note that my analog dial test results may have been affected by network congestion between my PC and my ISP's FTP server, as well as the workload of the server itself. Your own results may vary. My advice is to try downloading the same file at a few different DefaultRcvWindow values to determine the optimum value for your own configuration.

What if you use your PC for both LAN and WAN access? Alas, there is only one DefaultRcvWindow parameter and it affects all interfaces on your PC. Look for a happy medium - you may find yourself satisfied with a 24,576 byte DefaultRcvWindow, boosting your WAN throughput without adversely affecting LAN throughput when compared to performance under the default value.

Try it. Hey, what have you got to lose? You can always set the parameter back to default. Seize the window of opportunity! The DefaultRcvWindow, that is.