Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2001 01:09:30 -0700
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        "David Leimbach" <dleimbac@earthlink.net>, <questions@FreeBSD.ORG>
Subject:   RE: Real numbers on why loopback is slow in FreeBSD please read...
Message-ID:  <001801c10205$27b12f60$1401a8c0@tedm.placo.com>
In-Reply-To: <20010630112406.A1143@mutt.home.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>-----Original Message-----
>From: owner-freebsd-questions@FreeBSD.ORG
>[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of David Leimbach
>

[rant deleted]

>I noticed the really horribly poor latency of FreeBSD when using
>the loopback.
>
>Here are some numbers:
>[From the perf MPI test on FreeBSD ]
>

[numbers deleted, refer to previous message]

>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??
>

Dave,

  There's probably another reason that people aren't really paying attention
to your posting - they aren't seeing the same figures.

  Here's the output on my own home system, a Pentium 166Mhz:

mail# ping -s 4096 -f 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 4096 data bytes
.^.
--- 127.0.0.1 ping statistics ---
2574 packets transmitted, 2573 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.235/0.252/0.438/0.013 ms
mail#

   As you can see, with a packetsize of 4096  (8192, your largest size,
isn't
valid for ping) pinging the loopback as fast as possible, I'm only seeing
an average of 252 microseconds, not 400 microseconds as you posted.

  Doing the same thing again with a packetsize of 64 shows the following:

mail# ping -s 64 -f 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 64 data bytes
.^C
--- 127.0.0.1 ping statistics ---
2995 packets transmitted, 2994 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.071/0.075/0.229/0.004 ms
mail#

Now I'm seeing only 75 microseconds average.  Once again, this is vastly
different than the 200+ microseconds your seeing on your test.

  Now, you said in your posting that your perf stats run a ping pong test
so whatever your running ought to be identical to "ping -f -s somedatasize".
You didn't post how fast the CPU of your system is, nor any of the other
particulars.  And, you certainly didn't post the code that your using
to generate your numbers.

  Would you consider the possibility that your code that you wrote to
do this is horribly inefficient, instead of FreeBSD?  I have observed that
most
of the problems that people have troubleshooting is when they start assuming
that what they have done couldn't possibly have a problem, so they waste all
kinds of time searching for the problem that they are convinced that
something
else has.  You need to consider that your code is faulty and test this
hypothesis with other people's code that does the same thing.  If your code
and
everyone else's code running on FreeBSD all come up with the same numbers,
that are repeatable on other people's system, then we would get interested.
But as of now I have attempted to duplicate your hypothesis of inefficient
loopback performance under FreeBSD and found that there is no basis for it.



Ted Mittelstaedt                      tedm@toybox.placo.com
Author of:          The FreeBSD Corporate Networker's Guide
Book website:         http://www.freebsd-corp-net-guide.com



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?001801c10205$27b12f60$1401a8c0>