New Zealand ADSL Mailing List


Re: /dev/lo MTU size

From: cheryl <cheryl_at_cosynsoftware.com>
Date: Fri, 4 Jan 2002 17:40:14 +1300 (NZDT)
Message-ID: <Pine.LNX.4.33.0201041712330.22019-100000@gateway.cosyndmz>

On Fri, 4 Jan 2002, Juha Saarinen wrote:
>
> > Did you fiddle yours ? As you can see, my lo adapter has a much smaller
> > MTU.. from a default slackware 7.1 install. I also note that your one
> > has a lot more activity than mine :)
>
> Nope... ~16KB seems to be the default. Checked two other RHL boxes, plus
> two FreeBSD 4.x systems which have the same. BSDi 4.1 uses 4,352 bytes
> though.

If you go into /usr/src/linux/drivers/loopback.c you'll see
that the MTU of your loopback device is hard-coded. YMMV!
on my SuSE 7.1 box running 2.2.18, it's 3924 but on 7.3 with
a lovingly hand-crafted 2.4.16 (with PPPoATM bits added),
it's 16KB or --

dev->mtu = (16 * 1024) + 20 + 20 + 12;

They've been gradually increasing the size with successive
kernel versions. It's tuned so that when the kernel allocates
space for the loopback pseudodevice's data in memory, so it
all *just* fits into one page. Too large, you thrash your disk.
routing. Too small, you're making too many calls to kmalloc.

Read The Source, Luke!

Cheryl

-- 
This message is part of the NZ ADSL mailing list. 
see http://unixathome.org/adsl/ for archives, FAQ, 
and various documents. 
To unsubscribe: send mail to majordomo@lists.unixathome.org 
with "unsubscribe adsl" in the body of the message 
 
Received on Fri Jan 4 18:16:15 2002

This archive was generated by hypermail 2.2.0 : Thu Nov 30 11:48:20 2006 EST