How to set MTU?

Monkey_Demon

Explorer
Joined
Nov 11, 2016
Messages
85
The fine manual provides this guidance about setting the MTU value:

Maximum Transmission Unit, the largest protocol data unit that can be communicated. The largest workable MTU size varies with network interfaces and equipment. 1500 and 9000 are standard Ethernet MTU sizes. Leaving blank restores the field to the default value of 1500.

Is there a more complete explanation somewhere -- one that would advise what platform characteristics influence one's choice of MTU values and how to decide on them?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
1500 is the right number for most things and hence the default.

For high speed transfers (usually implies 10Gbit or higher), it can be necessary to reduce the packet fragmentation by increasing the packet size, hence the MTU of 9000 can be useful to get the full throughput on a 10Gbit or more network. That is unlikely to have a positive impact on 1Gbit networks, but in some special cases it may help.

For VPNs or tunneled connections, it can be necessary to allow for overhead of the tunnel/vpn in each packet in order to make the total unit 1500 or less... in that case, sometimes the MTU would be set at 1492 or 1486... depends a bit on the system and its overhead.
 

Monkey_Demon

Explorer
Joined
Nov 11, 2016
Messages
85
1500 is the right number for most things and hence the default.

For high speed transfers (usually implies 10Gbit or higher), it can be necessary to reduce the packet fragmentation by increasing the packet size, hence the MTU of 9000 can be useful to get the full throughput on a 10Gbit or more network. That is unlikely to have a positive impact on 1Gbit networks, but in some special cases it may help.

For VPNs or tunneled connections, it can be necessary to allow for overhead of the tunnel/vpn in each packet in order to make the total unit 1500 or less... in that case, sometimes the MTU would be set at 1492 or 1486... depends a bit on the system and its overhead.

Thanks. This is extremely clear and helpful.

I'd like to see it appear verbatim in the documentation, or at least a link to something as clear and logical.

Perhaps the only thing I'd add would be a link to empirical results from testing. There must be engineering models to derive optimal MTU settings depending on the local configuration, but empirical test results would be easier for most people to understand and probably more convincing.
 

Monkey_Demon

Explorer
Joined
Nov 11, 2016
Messages
85

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
Thanks. This is extremely clear and helpful.

I'd like to see it appear verbatim in the documentation, or at least a link to something as clear and logical.

Perhaps the only thing I'd add would be a link to empirical results from testing. There must be engineering models to derive optimal MTU settings depending on the local configuration, but empirical test results would be easier for most people to understand and probably more convincing.
hello

MTU, MRU, ethernet frame and other is available publicly on lots of site including wikipedia
can't include on documentation "everything"
presume readers "know" about
that remember me a message from InternetExplorer 4 looks like "Copy Internet to c:\"
old guy maybe remember :tongue:
cheers
 

Monkey_Demon

Explorer
Joined
Nov 11, 2016
Messages
85
hello

MTU, MRU, ethernet frame and other is available publicly on lots of site including wikipedia
can't include on documentation "everything"
presume readers "know" about
that remember me a message from InternetExplorer 4 looks like "Copy Internet to c:\"
old guy maybe remember :tongue:
cheers

Fair enough.

The other side is that users can't be expected to know "everything": all aspects of FreeBSD, ZFS, networking, hardware interfaces, etc. I'm just suggesting a bit more hand-holding when something is both not self-explanatory and a topic unfamiliar to a substantial proportion (say >5%) of users.

In response to your note, I searched for "MTU." After "Michigan Technical University," I found a Wikipedia page that goes into way more detail than I need. I suppose if I bother to read all of it, it would answer my question. But sretalla & no_connection saved me lots of time. I presume a similar, slight modification to the documentation would save others comparable time.

BTW, talking about old guys, back in the days (c. 1970) when I worked for IBM and then MIT, I was lead systems programmer on a 360 mainframe. Ironically, my main responsibility was communications. So I am very aware of tuning buffer sizes to accommodate application and hardware requirements. Had I not decided to go back to graduate school, my next assignment would have been getting our PDP 10 computers to communicate with our mainframe using a newfangled technology we were developing. IIRC, it was called "computer networking." :grin:
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Most of the time, leaving the settings at their default values is going to be your best bet. Unless you have a specific reason for changing it, trying to tune MTU usually creates more problems than it solves - and rarely improves performance. Especially with networking, where you need to be compatible with every device on your network.

Devices are a lot smarter now, than they were in the 70's.
 
Joined
Jul 10, 2016
Messages
521
Devices are a lot smarter now, than they were in the 70's.
Exactly, most routers have an auto setting for MTU size.

You can do an internet search for ping test to determine optimal MTU and you'll find many links explaining how to determine the optimal MTU size for your network setup.
 

Similar threads

Top