*BSD News Article 74082


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!news.mira.net.au!news.vbc.net!garlic.com!news.scruz.net!kithrup.com!news.Stanford.EDU!bloom-beacon.mit.edu!news.mathworks.com!news-res.gsl.net!news.gsl.net!nntp.coast.net!howland.reston.ans.net!surfnet.nl!news.unisource.nl!xs4all!plm.xs4all.nl!plm
From: Peter Mutsaers <plm@xs4all.nl>
Subject: Re: TCP latency
X-Newsreader: Gnus v5.2.26/Emacs 19.31
Sender: plm@localhost.xs4all.nl
Organization: My Unorganized Home
Lines: 120
Message-ID: <87ohle1v5h.fsf@localhost.xs4all.nl>
References: <4paedl$4bm@engnews2.Eng.Sun.COM>
	<31E106AF.41C67EA6@dyson.iquest.net> <4rvmtf$ven@linux.cs.Helsinki.FI>
	<31E3D9E2.41C67EA6@dyson.iquest.net> <4s5bl2$qpg@linux.cs.Helsinki.FI>
	<31E664EB.167EB0E7@inuxs.att.com> <4s67sk$oa9@fido.asd.sgi.com>
	<31E6B8AB.3E6C@indy.celebration.net> <4s7j2r$blf@fido.asd.sgi.com>
	<31E7BD6F.167EB0E7@dyson.iquest.net> <4s8sau$jsh@fido.asd.sgi.com>
	<31E80933.41C67EA6@dyson.iquest.net> <4saf55$dl5@verdi.nethelp.no>
	<87k9w6g6u4.fsf@localhost.xs4all.nl>
	<31E9D0CC.41C67EA6@dyson.iquest.net>
	<87ybklz05q.fsf@localhost.xs4all.nl>
	<31EAD699.41C67EA6@dyson.iquest.net>
Date: Wed, 17 Jul 1996 20:28:58 GMT
Xref: euryale.cc.adfa.oz.au comp.os.linux.networking:45631 comp.unix.bsd.freebsd.misc:23888

>> On Mon, 15 Jul 1996 18:39:05 -0500, "John S. Dyson"
>> <toor@dyson.iquest.net> said:

    JSD> Peter Mutsaers wrote:
    >> 
    >> >> On Mon, 15 Jul 1996 00:02:04 -0500, "John S. Dyson"
    >> >> <toor@dyson.iquest.net> said:
    >> 
    JSD> Peter Mutsaers wrote:
    >> >>
    >> >> I just measured lmbench on my machine with both FreeBSD and Linux
    >> >> (both current). It is a P90 with 48M.
    >> >>
    >> 
    JSD> I don't want to start a controversy, but I would like to know
    JSD> what the date was that you picked up your FreeBSD-current.
    JSD> Lots of changes (improvements) have been made recently....
    JSD> (BTW, your numbers are pretty much in-line with what I would
    JSD> expect.)
    >> 
    >> The FreeBSD-current was completely current (I track it with CTM).
    >> 
    JSD> Cool, just wanted to know.  It really appears that the OSes
    JSD> are near parity in many areas now.  The UDP number, I can
    JSD> understand right now, but the shell fork/exec time is
    JSD> suprising from the Linux side.  I know that I (we) have done
    JSD> some very aggresive optimizations, but I wonder if their BASH
    JSD> was linked with shared libs or something like that.

Yes, /bin/sh (a link from /bin/bash) is indeed dynamically linked. In
fact on any Linux installation I know everything in /sbin and /bin/is
dynamically linked. I stil think it is a waste of diskspace that this
isn't true for FreeBSD; there is no need to link these statically
as long as all shared libraries reside in /lib (on the root filesystem
too).

By the way I did a new measurement, with FreeBSD current versus Linux
2.0.5, this time with lmbench 1.1:

            Processor, Processes - times in microseconds
            --------------------------------------------
Host                 OS  Mhz    Null    Null  Simple /bin/sh Mmap 2-proc 8-proc
                             Syscall Process Process Process  lat  ctxsw  ctxsw
--------- ------------- ---- ------- ------- ------- ------- ---- ------ ------
plm.xs4al FreeBSD 2.2-C   90      10      3K     14K     23K  103     37     49
plm         Linux 2.0.5   90       4      2K     11K     49K  258     14     21

FreeBSD's null syscall has become faster somehow than a week ago.
mmap latency of Linux is much better than 1.3.99 was. ctxsw's are
still the same.

            *Local* Communication latencies in microseconds
            -----------------------------------------------
Host                 OS  Pipe       UDP    RPC/     TCP    RPC/
                                            UDP             TCP
--------- ------------- ------- ------- ------- ------- -------
plm.xs4al FreeBSD 2.2-C     107     346     584     426     756
plm         Linux 2.0.5      47     260     576     364     736


Both Linux and FreeBSD improved in RPC and TCP latencies compared to
my last measurement. Still Linux beats FreeBSD somewhat.

            *Local* Communication bandwidths in megabytes/second
            ----------------------------------------------------
Host                 OS Pipe  TCP  File   Mmap  Bcopy  Bcopy  Mem   Mem
                                  reread reread (libc) (hand) read write
--------- ------------- ---- ---- ------ ------ ------ ------ ---- -----
plm.xs4al FreeBSD 2.2-C   42   10     28     39     26     25   49    45
plm         Linux 2.0.5   24    9     26     43     26     25   49    46


FreeBSD's pipe bandwidth was 25, now is 42! Has it really improved
that much or is the benchmark inaccurate?


	    Memory latencies in nanoseconds
            (WARNING - may not be correct, check graphs)
            --------------------------------------------
Host                 OS   Mhz  L1 $   L2 $    Main mem    Guesses
--------- -------------   ---  ----   ----    --------    -------
plm.xs4al FreeBSD 2.2-C    89    11    219         428
plm         Linux 2.0.5    90    11    322         426

How can this difference exist in the L2 latency? Is this number not
only hardware dependent? Well, the WARNING says that these figures may
not be correct anyway.


Apart from these measurements, as a user I think FreeBSD feels a
little bit faster. This is mainly caused by the fact that things like
reading a tape in Linux (not a raw device) can occupy all of the
filesystem-buffer/cache, thus swapping out programs (does that really
happen, or is it my imagination?). FreeBSD keeps the use of buffers
for filesystem-caching somewhat limited I think, which often is
reasonable. Otoh unpacking tar files is much faster on Linux again.


By the way, I also ran iozone on FreeBSD's UFS and on Linux's
ext2fs. I use a NCR 815 SCSI controller, and read/wrote a 50MB file.

FreeBSD	 512b records: wrote 1.99 M/s, read 2.49 M/s
        8192b records: wrote 1.95 M/s, read 2.62 M/s

Linux    512b records: wrote 2.90 M/s, read 3.98 M/s
        8192b records: wrote 3.40 M/s, read 4.40 M/s

(raw speed I get on this disk is 5 M/s).

I don't know what these numbers are worth since these speeds depend
quite a lot on the current state of the filesystem (fragmentation
etc.).

ps.: At the moment I use both FreeBSD and Linux. I like both. FreeBSD
because it's so easy to stay "current", with CTM. Linux because it has
some essential features for me, such as a DOS emulator (which I need,
alas, for 1 application), good Java support, ISDN (I need that soon),
and new "hot" things are available for it much faster (such as Java).

Greetings,
-- 
______________________________________________________________________
Peter Mutsaers       |  Abcoude (Utrecht), |     "Memento Mori"
plm@xs4all.nl        |  the Netherlands    |