Optimising MTU setting in PPPoE ADSL Connections

Aug 26, '05 08:37:00AM

Contributed by: Anonymous

I use PPPoE on an ADSL connection which is limited only by the modem sync speed (ie: no data rate capping by the ISP, on the downstream at least), and I wanted to optimise the MTU to get the best throughput. The consensus seems to be that the optimal MTU is 1454, based on the fact that 1492 the maximum possible, and 1454 is the highest value less than this which doesn't end up with any padding bytes in the last ATM cell. An ATM cell is the basic transfer unit over a DSL link, and they are all fixed length, padded out to this length if the packet doesn't end on a cell boundary.

I tried configuring the 1454 value using a couple of techniques mentioned on macosxhints, but they didn't seem to have much effect, at least not on the downstream packets. A little network tracing showed that Mac OS X PPPoE was still negotiating an MTU of 1492 with my ISP. So I did a little digging around and came up with the following solution...

The PPP configuration is stored in the following property list file:

/Library/Preferences/SystemConfiguration/preferences.plist
Open this with your preferred text file editor. Note that you need root access for this -- see appropriate macosxhints on using sudo. Also make sure you save a copy first, and use a genuine text editor like vi or pico, not a word processor.

WARNING: You could easily make your system unbootable if you corrupt this file, so make sure you know what you're doing!

Search down for the PPP section -- it's introduced by this line:
<Key>PPP</Key>
Immediately following this, you will see an indented list of PPP properties. You need to insert two new parameters as follows (insert the appropriate value if you want something other than 1454):
<key>LCPMRU</key>
  <integer>1454</integer>
<key>LCPMTU</key>
  <integer>1454</integer>
I kept mine in alphabetical order, so after the edit my file reads:
.....
<Key>LCPEchoInterval</Key>
  <integer>10</integer>
<key>LCPMRU</key>
  <integer>1454</integer>
<key>LCPMTU</key>
  <integer>1454</integer>
<key>Logfile</key> 
  <string>/var/log/ppp.log</string>
....                               
Yours may differ, of course, depending on what properties are listed.

Save the file, and then restart your Mac (there's probably a neater way of causing the system to re-read the file, but I don't know what it is...) and connect to the internet. In my case, I consistently measured an increase in download speed of around 7-8KBytes/sec. Hardly worth writing home about, but it's nice to know that none of the ADSL modem speed is being wasted.

This tip works on 10.4 at least, but I haven't tried it on earlier versions.

Comments (13)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2005082115321647