*BSD News Article 73862


Return to BSD News archive

Newsgroups: comp.os.linux.networking,comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!nntp.coast.net!news.kei.com!news.mathworks.com!uunet!in2.uu.net!cygnus.com!kithrup.com!sef
From: sef@kithrup.com (Sean Eric Fagan)
Subject: Re: TCP latency
Organization: Kithrup Enterprises, Ltd.
Message-ID: <DuLJ8v.819@kithrup.com>
References: <4paedl$4bm@engnews2.Eng.Sun.COM> <31E80933.41C67EA6@dyson.iquest.net> <4saf55$dl5@verdi.nethelp.no> <87k9w6g6u4.fsf@localhost.xs4all.nl>
Date: Mon, 15 Jul 1996 17:58:07 GMT
Lines: 53
Xref: euryale.cc.adfa.oz.au comp.os.linux.networking:45309 comp.unix.bsd.freebsd.misc:23653

In article <87k9w6g6u4.fsf@localhost.xs4all.nl>,
Peter Mutsaers  <plm@xs4all.nl> wrote:
>I just measured lmbench on my machine with both FreeBSD and Linux
>(both current). It is a P90 with 48M.

And we all thank you ;).

>Host                 OS  Mhz    Null    Null  Simple /bin/sh Mmap 2-proc 8-proc
>                             Syscall Process Process Process  lat  ctxsw  ctxsw
>--------- ------------- ---- ------- ------- ------- ------- ---- ------ ------
>plm        Linux 1.3.99   90       4    2.1K   11.5K     53K  404     14     19
>plm.xs4al FreeBSD 2.2-C   90      15    2.9K   13.6K     23K  102     37     45

JOhn's complaint (which unfortunately has led to a shouting match :() is
that the "null syscall" benchmark doesn't use a good choice for one.  I've
not looked at the code, but John is saying that it is using a write of a
single byte to /dev/null.  If that's true, then, no, it's not a good "null
syscall" benchmark.  getpid() is probably a better test (except that some
OSes have special cased it, and others have moved it at least partially into
user code ;)).

This *would*, however, show that FreeBSD's VFS layering has considerably
higher overhead than Linux, and I think that is a definite target for
FreeBSD to improve upon.  (Since the VFS layering is used *so often*.)

The mmap latency is surprisingly better in FreeBSD than linux.  I am pretty
impressed with that.

The context switching is also interesting... I'd be curious to see what
would happen for higher numbers -- 2-proc and 1024-proc, for example.

>Host                 OS  Pipe       UDP    RPC/     TCP    RPC/
>                                            UDP             TCP
>--------- ------------- ------- ------- ------- ------- -------
>plm        Linux 1.3.99      51     260     624     400     786
>plm.xs4al FreeBSD 2.2-C     108     344     622     409     784

Even with FreeBSD's rewritten pipe interface, it's still twice as slow as
Linux.  That's interesting.  The TCP numbers (for localhost!) are close
enough that I don't think it matters much.

>Host                 OS Pipe  TCP  File   Mmap  Bcopy  Bcopy  Mem   Mem
>                                  reread reread (libc) (hand) read write
>--------- ------------- ---- ---- ------ ------ ------ ------ ---- -----
>plm        Linux 1.3.99   24  8.1   25.4   41.7     26     25   49    46
>plm.xs4al FreeBSD 2.2-C   25  9.0   27.9   39.6     26     25   49    45

Here we see that FreeBSD is *slightly* faster for TCP throughput, but
everything else seems to be about the same.

Now, what we need is a table showing TCP latencies and bandwidth between:
linux and linux, freebsd and freebsd, and linux and freebsd.