*BSD News Article 69591


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.mel.connect.com.au!news.syd.connect.com.au!gidora.kralizec.net.au!not-for-mail
From: bde@zeta.org.au (Bruce Evans)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: FreeBSD vs. Linux
Date: 28 May 1996 23:26:03 +1000
Organization: Kralizec Dialup Unix
Lines: 42
Message-ID: <4oeutc$k2j@godzilla.zeta.org.au>
References: <318FA7CB.8D8@hkstar.com> <4o1om8$156@dyson.iquest.net> <4o4lel$mu3@Mars.mcs.com> <4o7gsh$8ge@dyson.iquest.net>
NNTP-Posting-Host: godzilla.zeta.org.au

In article <4o7gsh$8ge@dyson.iquest.net>,
John S. Dyson <root@dyson.iquest.net> wrote:
>>...
>If your systems are not saturating your networks, then the slower networking
>perf on Linux won't make much difference.  Slow network cards probably
>overshadow most of the os overhead of either FreeBSD, Linux or NetBSD.
>At 100% 10Mbps ethernet, an NE2000 takes 50% of your CPU for ISA
>bus overhead, and an SMC shared memory card takes about 25% of your
>CPU for ISA bus overhead.  These numbers are constant if you are
>using a 486/66 or Pentium-Pro!!!  (since the bus timing is pretty much the
>same.)

They are also rounded down and optimistic.  10Mbps gives well over 1MB/s
(I get 1100K/s throughput), so shared memory must take at least
1100*1024/4000000 = 28% of the cpu at the normal maximum ISA transfer
speed of 4000000 B/s.  My nondescript shared memory card and ISA bus
have a transfer speed of only 2160000 B/s, so the ISA bus overhead is
58%.  On my 486/33, the interrupt+system overhead for receiving tcp/ip at
1100K/sec is 65%+20%.  The same card in NE2000 mode has 20% larger ISA
overheads so it takes approximately 100% of the cpu for slightly less
than 1100K/s throughput.

>Things get more interesting (the OS becomes more critical) when you
>use efficient PCI based ethernet adapters or 100Mbps networks.

E.g., the 10Mbps 21140 PCI card on my P133 has interrupt+system overhead
of 3%+7% for transmitting at 1100K/s.

>There is a gross misconception that the mbuf based networking code on
>*BSD is inefficient.  Quite the contrary, copies are minimized at least
>on the recent *BSD releases.  Mbuf clusters are used much more intelligently

It is inefficient.  7% of a P133 is a lot.  The copying overhead is
relatively insignificant.  My current bcopy routine runes at 70MB/s for
uncached memory and 130MB/s for cached memory.  Thus copying 1100K once
directly accounts for at most 1.5% of the 7% (the indirect costs for
thrashing the D-cache are very hard to measure.  Perhaps they account
for most of the missing 7%).  Checksumming probably accounts for another
1%.  These numbers are much more interesting when multiplied by 10 for
100Mbps.
-- 
Bruce Evans  bde@zeta.org.au