linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:38:01 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info
Getting crappy download speeds? Time to edit your MTU and MRU

Thats great Sensei, but, uh what is MTU or MRU? Where and how do I do edit them?

MTU:
Short for Maximum Transmission Unit, the largest physical packet size, measured in bytes, that a network can transmit. Any messages larger than the MTU are divided into smaller packets before being sent.
--the key is to is decide how big your bandwidth pipe is and select the best MTU for your configuration.

For instance: I have a 33.6 modem (yeh I know its sad). I use a MTU and MRU of 576. If you have a larger pipe you may want to try 1500.

MSS: (I think this is the same as MRU-maximum receiveable unit?)
Maximum Segment Size - The maximum size of the data that is contained inside of each IP packet. Using a size too small will slow down data transfers, while using a size too big will cause data "fragmenting". Also, too big a size makes error recovery take quite a bit longer on noisy telephone connections.

To edit your file:

su -
cd /etc/ppp
(use your favorite editor)
pico options

   mtu 576
   mru 512


Note:
Added by: James Cleverdon

This is what you should add to your options file. Save the file and you are now finished.

For scads more options and tweaks (including some scary ones), take a look at the sample options file that comes with the ppp docs:

/usr/doc/ppp-2.3.10/sample/options

(Where 2.3.10 is the current version. Your version number may vary.)

You can simply do:

cp /usr/doc/ppp-2.3.10/sample/options /etc/ppp/options
pico /etc/ppp/options


And hack to your heart's content.

While there are comments above each option, the pppd man page [man pppd] also sheds a bit of light on some of the more arcane ones.

Note
Added By:
David K.

The MRU is the size of the largest packet you'll accept. Basically it tells the PPP server to break packets up into smaller chunks until they're no larger than the MRU. A larger MRU means you'll accept larger packets, and with a larger packet there's a larger chance of a transmission error which means it has to retransmit the WHOLE packet. MRU should never go below 250, however, since then the packet overhead starts to catch up. Basically, your best bet is to try random values between, say, 250 and 1500 until you find one which works well. (1500 is the default, and is definitely too big for PPP.)

One thing you can do to gauge a good MRU is to connect with your MRU set to 1500 and then use ping -s. Basically, do something like:

ping -s 456 -c 100 pick.server.com | tail -1

to see the packet loss when your packets are 456-big (this will take about a minute and a half), and repeat that for a whole bunch of different values until you find a reasonably-large one with a small amount of packet loss.

Unfortunately, you can't change the MRU at runtime, since that's setup when you first connect.

The MTU is exactly like the MRU except it affects outgoing connections instead. So you can probably gauge a decent MRU by fiddling with the MTU, uploading a file, and then comparing its thoroughput with a different MTU. Of course, your uploads are only at 33.6Kbit instead of 56, so it'll only be an approximate value.

You can change your MTU at runtime though; as root, do:

ifconfig ppp0 mtu (value)

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.

Have anything to add to this NHF? nhfs@linuxnewbie.org
[-NHF Control Panel-]
The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif