Linux Large Datagram Problem

John Jannotti jj at lcs.mit.edu
Wed Nov 10 18:10:39 EST 2004


I'm going to do something I hate.  You've asked, "How do I do X", I'm going
to tell you not to do X.

Sending packets larger than the MTU is almost never a good idea.  (I
hedge... I wanted to say it's never a good idea.)

Suppose your single UDP packet is 15,000 bytes.  That's about 10 datagrams.
So, if there's a 1% loss rate, you've now got (roughly) a 10% chance of
losing one of the datagrams.  And if you do, you have to retransmit all of
them.  (Your application isn't going to get the fragments that do arrive.)

So I guess it only makes sense if the data you are sending is both
time-sensitive (so you don't intend to retransmit anyway), and not useful
in pieces (so you don't care that you've wasted 9 datagrams of useful
work).  But even if that's true, are you really saving yourself enough work
to worry about?  It sounds like you have needs that might break the 64k
mark, so you're going to have to reassemble at the application layer
anyway.

With that all said, if you were only asking b/c you were curious, sorry.
(Also, if you're only intending this on a LAN with a huge MTU, double
sorry.)

  jj




More information about the Discuss mailing list