Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2001 11:24:06 -0500
From:      David Leimbach <dleimbac@earthlink.net>
To:        questions@freebsd.org
Subject:   Real numbers on why loopback is slow in FreeBSD please read...
Message-ID:  <20010630112406.A1143@mutt.home.net>

next in thread | raw e-mail | index | archive | help
It seems that the recent flood of stupid micro-optimization questions
[Some of which were mine involving gettimeofday] has made people on this
list ignore questions where anyone says anything along the lines of...

"FreeBSD has a really slow .... compared to ...."

Many of these questions may actually be dumb or trolls or flaimbait but 
other people have valid questions.

I asked one yesterday where I wanted to know how I can speed up the 
performance of the loopback device.  The reason I asked was that I would 
like to be able to run MPI jobs on FreeBSD someday and I am involved in
porting one implementation of MPI to FreeBSD.

I noticed the really horribly poor latency of FreeBSD when using the loopback.

Here are some numbers:
[From the perf MPI test on FreeBSD ]

  Msg_len       Latency      Rate     Strm Latency   Strm Rate
   [byte]        [us]       [MB/s]        [us]        [MB/s]

        0       223.44        0.00       173.35          0.00
        4       331.89        0.01       183.77          0.02
        8       331.54        0.02       175.11          0.04
       16       331.72        0.05       174.81          0.09
       32       331.64        0.09       181.86          0.17
       64       332.71        0.18       348.80          0.17
      128       333.13        0.37       216.24          0.56
      256       344.48        0.71       425.06          0.57
      512       348.74        1.40       422.60          1.16
     1024       361.96        2.70       229.65          4.25
     2048       368.53        5.30       209.90          9.31
     4096       411.84        9.48       485.78          8.04
     8192       492.99       15.85       573.21         13.63

[Same test in Linux different machine 2.4.0 kernel]


  Msg_len       Latency      Rate     Strm Latency   Strm Rate
   [byte]        [us]       [MB/s]        [us]        [MB/s]

        0        40.11        0.00       204.50          0.00
        4        49.60        0.08       174.45          0.02
        8        49.21        0.16       216.60          0.04
       16        49.35        0.31       181.85          0.08
       32        49.35        0.62       218.98          0.14
       64        49.22        1.24       181.95          0.34
      128        49.67        2.46       218.81          0.56
      256        49.73        4.91       202.71          1.20
      512        54.22        9.01        33.34         14.65
     1024        52.49       18.61        34.92         27.97
     2048        53.07       36.80        59.23         32.97
     4096        67.57       57.81        69.64         56.09
     8192        82.55       94.64       146.57         53.30

So I think I have valid reason to be worried.  This is just a ping-pong
test that perf runs but the message latency on linux is more desirable 
than FreeBSD.

Is this related to proc speeds at all?  If so how much?

I would like to do better than 223.44 ms latency for a 0 data length packet
in FreeBSD.

Any ideas??


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010630112406.A1143>