LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-23-2006, 10:15 PM   #1
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 65
Fine tuning my MTU


Currently my MTU is set at the default 1500.

What is the best way of determining my optimal MTU? Is there a program that can assist? Is there a decent guide out there for accomplishing this in Linux? (99% of the guides out there are for Windows)

Thanks in advance
 
Old 05-24-2006, 06:11 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
There is no "optimal Maximum Transfer Unit" for all destinations.

On one path you may cross a link layer that is using cells of 500 while on others, frames of 1500 will not get fragmented.
It is dynamic. To resolve this, there is a protocol called Path MTU discovery.

Unfortunatly P-MTUD is not really working everywhere . Sometimes people put their firewall to a paranoid level which result in poor network performance. It gets even more complex when you cross a vpn or a private adress space where NAT doesn't do its job of Nating icmp packets.

When I was on PPPoE I had set my MTU to 1400 and I had a very good network performance.

MTU is a per-path parameter. Its not even a per-destination one as packets can take different paths to reach the same destination.

There is a way of determining the MTU to one destination:
Code:
#ping -M do -s <icmp_packet_size> <server>
Start with icmp packet size from 1400 and go up using dichotomy. Until you find the optimal "path to <server> maximum transfer unit".
The MTU for this server is icmp_packet_size+header(ip)+header(icmp)=icmp_packet_size+28

You can configure it like this:
#this disable path mtu discovery
Code:
sysctl -w net.ipv4.ip_no_pmtu_disc=1
#this sets interface mtu
Code:
ifconfig eth0 blablah.. mtu 1400

A website which was interesting for improving performance (have not checked lately)
http://www.speedguide.net/
A reference guide with some ideas:
http://www.linux.com/howtos/Adv-Rout...iscovery.shtml

Last edited by nx5000; 05-24-2006 at 06:12 AM.
 
Old 05-24-2006, 10:40 AM   #3
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Original Poster
Rep: Reputation: 65
I just want my mtu optimized between me and my isp gateway....Thats the only constant, and I know on this connection, it is less than 1500.

Thanks for the link, and the 'mini-guide', both usable info.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fine-tuning samba TomalakBORG Linux - Networking 5 01-31-2006 11:34 PM
Fine tuning after upgrade? Alan Lakin Slackware 1 09-14-2005 07:50 AM
squid fine tuning help!!!! veeraabose Linux - Networking 3 03-07-2005 07:31 AM
MTU tuning for 56k modem linuxbeliever Suse/Novell 0 02-08-2005 01:04 AM
FTP fine tuning eidolon532 Linux - Networking 1 04-15-2003 03:33 PM


All times are GMT -5. The time now is 01:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration