Modem Transfer Rate Optimization

Last Update: Saturday, November 14, 1998

Some Modem Basics

MaxMTU Info

Changing MaxMTU

Using MTUSpeed

Using TweakDUN

Using PPP Boost

Comm Port Overruns

New Winsock Driver

Unimodem Update

Modem Info Links

Optimization tools

Monitoring Programs

Newsletter Subscription
subscribe unsubscribe
Price Search
      Keyword(s)
 
webdog


General Modem Information

It is not my intention to discuss all basic modem aspects and fundamentals. Rather, this section will concentrate on modem transfer rate optimization for an Internet connection. All the modem basics have already been deeply covered by the excellent Navas Modem FAQ as well as by Curt's High Speed Modem web sites. So for any topics not covered by my modem information page, please refer to either of these two web sites.


Some Modem Basics
Back to Top of Page

The word MODEM is an acronym for Modulator-Demodulator. Modems accept digital data supplied by the local PC, and convert it to a modulated analog wave form that can be transmitted over the phone line and conversely  accept a modulated analog wave from the telephone line, convert it to a digital form, and pass it on to the local PC.

To transmit information via a phone line a modem slices up the information sent by the computer into small packets using a defined communication protocol. On the Internet this protocol is named TCP/IP. To ensure efficient data transfer rates the users at both end of the line must strictly match the same protocols.

I will not explain in full detail the TCP/IP protocol, but just give some basic information about it.

TCP/IP stands for "Transmission Control Protocol / Internet Protocol". This protocol defines the size of the data packets to be sent over the net by giving each packet precise information that identifies it. This information is contained in a header which is taken from the first 40 characters of each transmitted packet.

In a local area network (LAN), the defined communication protocols are similar to those of the Internet but their size is quite different. A LAN protocol uses packet sizes of 1500 characters. The problem is that the Win95 Dial-Up Networking we use to establish our Internet connection is by default configured for communication over a LAN. When using the Internet, however, this configuration is very inefficient because the packet size used is 1500 while the Internet standard is 576.

The maximum packet size used on the Internet is called MaxMTU where MTU stands for Maximum Transmit Unit. As I said before, the standard Internet MTU is 576 so if you wish to optimize your modem transfer rates you must use this same value for both your receive and transmit packet size.


Optimizing Modem Transfer Rates Part 1

 

MaxMTU Optimization Information
Back to Top of Page

Using MaxMTU optimization software is a relatively easy thing, however there are some details you need to know to perfectly understand what you will be doing.

As I said before the MaxMTU Internet standard is 576, however, this value is including a 40 character header, so the true effective value is 536 because the first 40 characters are removed by Win95 DUN when you enable the IP header compression to enhance you performance. This new 536 value is named TCPMSS or just MSS in its short form.

Now what will happen with this MTU value of 576 is it will be used to build your receiving data window which is called RWIN. However, as many of us are using the header compression feature of Win95 Dial-up Networking, we will actually receive only packet sizes of 536 characters because the header compression feature is getting rid off of the 40 character header as I explained earlier. The RWIN value is just the number of packets you are asking to be sent from the server you intend to get information from. On the other hand, the RWIN value is closely related to the speed of the modem you are using. For instance, lets suppose you are like most people using a 28,800 modem. To effectively fulfill your modem speed capabilities, you will use a value of 6 for your RWIN, this way the server will send you 6 (MaxMtu packet of 576 characters less the 40 characters header =536 characters) packets of 536 characters of data in one shot thus giving an effective data transfer speed of 536 X 6 = 3216 characters or 3.2kcps which is not bad at all for a 28,800 modem.

Personally I have seen the best results with a RWIN value of 3216, but most people find the best result with 2144 (MSS X 4), so you will have to experiment and see for yourself which one is the best for you!

Now maybe it would go better if I would explain the difference between characters and bits because you might be wondering why if I have a 28,800 modem it can only get about 3.5kcps of data? in the best case ?

As a fact, a character count for 10 bits while the information only occupies 8 bits. The two remaining bits are used for the start bit and the stop bit which gives a total of 10 bits. Some people also use the word Baud and this is probable the most misleading term to use when speaking of modem data transmission activities.

For as long as we speak about the serial port speed, one bit is equal to one Baud. So, 115,200 bits is the same as 115,200 baud. The definition of a baud is the number of state changes that a signal can take in a given period. As a fact, the term baud and bit have been so confusing that they recently have been changed for "symbol" to clear any possible confusion with the two preceding terms. In the early days of modems, only a single bit was carried by baud. However, nowadays modems use to carry several bits by baud.

With Bell 103J (300 bps) modulation, the old modems used two states (specifically, transmitting at two frequencies) to indicate the two data bits and they encoded at 1 bit per baud. Starting with Bell 212A, they changed their strategy. They no longer used frequencies to send bits, but rather sent out a continuous sine wave stream at a fixed frequency and introduced phase shifts and, later, amplitude changes to encode multiple bits per signal/baud. For instance, Bell 212A (1200 bps) uses 90 degree phase shifts; there are four 90 degree shifts in a cycle, so they could encode two bits (four possible states - or, more accurately, four possible state CHANGES) per baud. The modem permits state changes 600 times per second, so it is said to be operating at 600 baud. With V.22bis (2400 bps) uses smaller phase shifts plus amplitude changes to encode four bits into sixteen possible state changes at 600 baud.

The following table, taken from the USR BBS, shows the symbol/signal/baud rate vs. bit rate requirements (and more) for V.43 and V.FC (one of its proprietary predecessors):

Symbol Rate Protocol Carrier
Frequency
Bandwidth
Requirements
Maximum
Bit Rate
2400 V.34
V.34/VFC
1600Hz
1800Hz
400-2800 Hz
600-3000 Hz
21600
21600
2743 V.34
VFC/V.34
1646 Hz
1829 Hz
274-3018 Hz
457-3200 Hz
24000
24000
2800 V.34
VFC/V.34
1680 Hz
1867 Hz
280-3080 Hz
467-3267 Hz
24000
24000
3000 V.34
V.34/VFC
VFC
1800 Hz
2000 Hz
1875 Hz
300-3300 Hz
500-3500 Hz
375-3376 Hz
26400
26400
26400
3200 V.34
VFC
1829 Hz
1920 Hz
229-3429 Hz
320-3520 Hz
28800
28800
3429 V.34 1959 Hz 244-3674 Hz 28800

Now, to come back to our MaxMTU and TCP-RWIN, I would like to add a few things. One could always ask for an RWIN higher than a value of 6, but then problems might arise. Even if the remote server can effectively respond to this request, it doesn't mean that your modem will follow. For instance if you call for an RWIN value of 8 you might effectively receive 536 X 8 = 4288cps of data, but your 28,800 modem is not fast enough to accommodate such a feed so some packets sent by the remote server wont be acknowledged fast enough, and for this reason they will be resent to you thus dramatically reducing your effective transfer rate.

For each packet that a remote server is sending to you it needs an acknowledge, and this acknowledge is actually sent by your system. The time window available to receive an acknowledge is very short, and when a remote server does not receive the acknowledge in this required time frame, it just assumes that you didn't received the packet and it will resend it to you. This won't be visible on your data transfer rate, because whatever data transfer rate monitoring program you're using will show a good 3.2kcps to 3.5kcps transfer rate. However, your effective data transfer rate might be much lower than this because of resent data packets you have already received can count for as much as 50% of all the data packets you're receiving! Half of these packets were not acknowledged in time and they have been resent to you, giving an effective data transfer of only 1.5kcps to 1.7kcps!

So, the only way to ensure to get the best transfer rate performance is to call for a number of packets (RWIN) corresponding as closely as possible to your maximum modem transfer rate capabilities. Today's modem maximum transfer rates vary, pretty much depending on the type of modem you have. For instance a 28,800 modem maximum transfer rate is roughly 3.5kcps, a 33,600 modem can go as high as about 4.1kcps while a 56k modem could theoretically reach about 6kcps. All these figures are supposing perfect phone line conditions, because when phone line conditions are degrading your data transfer rates as well as your connection speed will slow down.


Changing MaxMTU Settings

Back to Top of Page

Changing the Win95 MaxMTU setting is not easily accomplished by the end user because it is hidden in the Win95 registry. Most of the time end users never need to modify the registry values, and as a matter of fact many people don't even know of the existence of this file. However, if you hope for some real improvement of your modem transfer rate, you will have to modify Win95 registry MaxMTU values.

To modify Win95 MAxMTU registry values there are two possible options. Either a manual modification or a software assisted modification. Because we now have the possibility to use some very good software specially designed to modify Win95 MaxMTU values, I won't tell you how to manually edit your Win95 registry. The registry is a very touchy file system used to tell Win95 all of the installed hardware and software configuration, so if for any reason this file becomes corrupted you might have to completely re-install Win95 and this is not in anyone's best interest.

Warning

Before you use any MTU performance maximizing software, you should backup your registry files. If for any reason something goes wrong in the registry updating process you will be able to come back to the state these files were in before the modification by the software you will use.

The Win95 registry consists of two files named "system.dat" and "user.dat". The procedure to manually backup Win95 registry files goes as follows:

To Backup The Win95 Registry Files:

1. Open the Explorer and open the Windows directory
2. In the View menu, choose "Options" and be sure that the box "Show all file types" is checked.
3. Be sure the box "Hide MS-DOS file extensions" is Unchecked and hit "OK"
4. Now go to C:\windows
5. Copy system.dat and user.dat to a separate directory...
       for example C:\Backup or copy the files using just a slightly different name like "system.old" and "user.old", this way you won't need to look in another directory to find them as they will be just beside the .dat working files.


To Restore The Win95 Registry Files

  1. Reboot computer to DOS (hit ALT+F5 during start up F4 if you kept you old DOS installed
  2. At the DOS prompt type: cd windows and hit enter
  3. Type: attrib -h -s -r system.dat and hit enter
  4. Type: attrib -h -s -r user.dat and hit enter
  5. If you just renamed your files then type cd\windows
  6. type del system.dat
  7. type del user.dat
  8. type rename system.old system.dat
  9. type rename user.old user.dat
  10. then restart windows ... type: win at the DOS prompt or hit CTRL+ALT+DELETE to reboot
  11. If you copied your files to another directory named backup then Type: cd\
  12. Type: copy c:\backup\system.dat c:\windows and hit enter
  13. Type: copy c:\backup\user.dat c:\windows and hit enter
  14. Then restart windows ... type: win at the DOS prompt or hit CTRL+ALT+DELETE to reboot

Note: Some software does this procedure for you, but there has been some reports that the files have not been backed up properly in some cases, so you better do it manually, this way you'll be sure about what is going on.


Using MTUSpeed Optimization Software
Back to Top of Page

Using MaxMTU optimization software is very easy, as long as you understand what you're doing. According to the information I gave you in the preceding paragraphs, you now have sufficient information to use this software, so we will now have a closer look at how to use them.

To my knowledge, there are actually 3 such software available; MTUSpeed, TweakDUN and PPP Boost which are all downloadable directly from the links at the bottom of this page.

We will now begin to see how to use MTUSpeed (my favorite one) by using its main control panel. MTUSpeed's latest version available is 4.03

mtuscreen.gif (8773 octets)


To change the MTU you must click on the right column menu button labeled "Change MaxMTU" which allows you to enter your new MaxMTU value. So according to what I've explained earlier, you should input 576 as the MaxMTU value because the software will adjust this to the MSS value by itself. When you're done, you should check the right bottom corner RWIN Checkbox as well as the "Apply MTU value to all TCP key" and click to the "Update Registry" button and that's it. Your new registry key values are now recorded in Win95. All you have to do now is reboot your computer to make these values effective.

There are many other features in this software, but I'll let you discover them by yourself using the included help file if needed.

Don't forget that this is a shareware program not a freeware one. Please, if you use it and like it send your contribution to the creator of this great software!

 

Using TweakDUN Optimization Software
Back to Top of Page


Using TweakDUN is as straightforward as using MTUSpeed. The only differences are its front control panel and the number of features supported which are very limited compared to MTUSpeed.

Here is TweakDUN's 1.2 (latest release) control panel;

 

tweakdun.gif (7549 octets)

Again, you simply input the desired MaxMTU value into the corresponding window, set your RWIN values accordingly, and when ready you click on the OK button and the software will reset your registry to the new values. Reboot your computer and these new values will become effective.


Using PPP Boost Optimization Software
Back to Top of Page


PPP Boost is the most simple of these 3 to use as it only supports a few features.

This is the control panel of PPP Boost 1.2 (last version)

pppboost.jpg (38637 octets)

Again, you simply input the desired MaxMTU value in the corresponding window, set your RWIN values accordingly, and when ready you click on the OK button and the software will reset your registry to the new values. Reboot your computer and these new values will become effective.

 


Optimizing Modem Transfer Rates Part 2

 

Understanding Comm Port Overruns
Back to Top of Page


Optimization of your MaxMTU and RWIN values is not all you can do to optimize your modem transfer rates. This section will give you some more tips and tricks to further enhance your transfer rates.

Fast and efficient transfer rates are not guaranteed by the fact that you get nice download figures as reported by your Internet transfer rates monitoring software. This can hide something which is (most of the time) not visible for the software, and I'm talking about Comm Port Overruns.

A Comm Port Overrun is a problem that arises when data entered into the modem UART FIFO buffer is not emptied fast enough. This is very similar to what happens when too large of an RWIN value is used, but this time the out of sequence acknowledges are caused from another source.

Suppose for a moment that your modem is suffering from comm port overruns to see what could happen. A comm port overrun is caused by the CPU not releasing the interrupt requested by the modem to empty the FIFO buffer, which in most modern computers is a 16 bit buffer. The 16 bit space available in this buffer is in practice never totally used. The number of bits stored depends on the way you adjusted your modem receive FIFO in the Win95 port settings. By default, this value is 8 so the triggering circuit will only allow 8-bits to be stored in the FIFO buffer before requesting to be emptied. This value can be adjusted from 1 to 14 in your Win95 modem port settings. The lower values are usually used to cure comm port overruns while higher values are used to enhance modem transfer rates performance.

The fact that the CPU doesn't release the requested interrupt fast enough to empty the UART FIFO buffer means it also cannot stop the data which continues to enter the modem and overrun all the data already stored in the FIFO buffer (which was not emptied fast enough by the CPU). So, because this data has been overrunned by the new data, it is now missing and it'll have to be resent by the remote server.

There is only one way to know for sure if you actually are experiencing comm port overruns, and it is by enabling the modem log journal both in your networking and modem Win95 settings. When you have the modemlog journal enabled you can make a good Internet session using all Internet Software you usually are working with and after an hour or so you can disconnect and open the modemlog journal. If there has been any comm overruns in that session, the total number will be displayed.

Comm Overruns in excess of 50 for a one hour session should be considered serious!

Now if you get comm overruns over 100 for a one hour session then you have a real problem and you must find what is causing it.

Most of the time Comm Overruns are caused by something hanging the CPU and refraining it to service the FIFO buffer fast enough so the new data entering is overrunning the data already stored. This situation is often caused by the video card requesting too much CPU power. For instance, I had this problem with my Matrox Millennium 4WRAM, and it has been solved by adding the following line into the 386(enh) section of the system.ini file

[mga.drv]

PCIChipSet=1

These lines are refraining the card to be serviced in priority by the CPU via the PCI slot. Of course it slows it down the overall graphic performances of the card a bit, but sometimes there are situations that do not leave any other choices!

One of the more well known causes for comm port overruns are the S3-chip-based video cards which gain high-speed graphics performance by having their software driver steal interrupt cycles from the CPU! This keeps your CPU too busy to respond to comm port interrupts in time. The solution is an up-to-date driver, and using its option to turn-off this "speed-up" mode.

Another way to solve the problem might be to reduce your FIFO buffer trigger. Your Win95 modem comm port setting allows you to adjust this value from 1 to 14. Lower values might help you cure some or most of your comm overruns but will require much more CPU overhead. For instance, using a value of 4 (second position of the cursor) will tell the FIFO trigger to request a CPU interrupt for every 4 bits stored in the FIFO buffer. This way, the chances that new data will write over the data already stored are minimized, because the stored data will stay there for a shorter period of time. On the other hand using a value of 14 might also help because it allows the buffer to store 14-bits before being emptied, so it requires less frequent CPU interrupts to empty the FIFO buffer. The only way to know if changing the default triggering value could help you solve your overruns problems is by experimentation, so no one can tell how much success you will get with this!

In conclusion, comm overruns may come from many places in your computer and you might have to conduct several experiments before you solve the problem, but you don't have a choice if you really want to optimize your transfer rates performance. You must find what causes your CPU attention to be kept away from the FIFO buffer!

 

Getting A More Efficient Winsock Driver
Back to Top of Page

The default Win95 build 950a Winsock driver is rather old and not very efficient. A good way to improve your transfer rate performance is by getting a better Winsock driver.

A new upgrade has been issued by Microsoft and it is called the ISDN pack which includes a new improved Winsock driver as well as many new features added to Win95 sysmon.exe system monitor, which gives information about your modem data operation which was not available with the standard system monitor default installation.

Even though most of you will never use an ISDN modem, this upgrade is very useful because it doesn't interfere with Win95 Dial-up networking, but does make it much faster and adds some very interesting features to it as well.

Furthermore, the Winsock included with the ISDN Pack can support over 32k sockets while default Win95 build 950a Winsock driver only supports 256 sockets, so it might be very interesting to get more sockets available in case of a very long Internet session. This new Winsock driver is supposed to be faster and more efficient than the default one installed by Win95.

So, to gain from the ISDN pack you must first download the Microsoft ISDN Pack available here and follow the installation instructions. You might even uninstall it when the installation is completed if you wish, and it wouldn't make any difference because the uninstall doesn't remove the new features added to the sysmon and to the Win95 Dial-up networking (it doesn't remove the new Winsock driver either!)

There is also another Winsock update available here on the Microsoft FTP server. I can't tell if this one is better than the one coming with the ISDN pack, but you could also try it. As a matter of fact I read somewhere that the best and latest Winsock available is Winsock 2.2, but I just can't remember where so I couldn't tell you where to get it.

Note that this Winsock Update is not required if you have installed Win95 OSR2 because it is already included in that build as well as the ISDN pack if I remember well !

 

Microsoft Unimodem Update
Back to Top of Page


The final step in file updates to boost your modem transfer rate is to get the latest Microsoft Unimodem driver file which is version 5. Again Microsoft UnimodemV is available here on Microsoft FTP server.

I've also installed this new driver on my Win95 build 950a system and boy it made a great improvement. Actually I couldn't tell you which of the ISDN pack or UnimodemV made the greatest improvement, but both of them helped a lot.

Before I installed both of these upgrades my transfer rates were 2.2kcps to 2.8kcps, and now after the updates I'm getting rock hard 3.5kcps to 3.7kcps on compressed files and believe it or not i get between 7kcps to 11kcps from text files!

Note that this update is not required if you installed Win95 OSR2 because it is already included in that build !

A final tip to get the best possible performance is to disable your modem MNP5 compression. This feature is absolutely useless because it actually slows down all compressed file downloads. The fact that a file is already compressed brings absolutely nothing to compress it again, and as a matter of fact all that it does is enlarges the file for the added control bits necessary to decompress it. So, why enlarge a file when its not necessary? On a US Robotics modem all that you need to do is to add "&k3" without the quotes of course, to your Win95 dial-up modem extra settings to disable MNP5 compression. This way files already compressed won't be compressed a second time and won't be enlarged unnecessarily, while highly compressable files (I.e. text files) will always be able to be compressed. For other modem brands and other OS's you will have to check with your manuals to see what is needed to disable MNP5.

I hope all of this will be of some help to you and I wish you all the best transfer rates possible. Any comments or feedback would be very appreciated either by Email or by signing my guestbook.


Back to Top of Page

Modem Information Links

Transfer Rates Optimization Software

Transfer Rates Monitoring Software

Back to Top of Page