Subject: Re: pinging from NetBSD router slow than from workstation
To: Jeremy C. Reed <reed@reedmedia.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 07/05/2005 22:54:40
On Tue, Jul 05, 2005 at 01:18:34PM -0700, Jeremy C. Reed wrote:
> On Tue, 5 Jul 2005, Manuel Bouyer wrote:
> 
> >>On my router:
> >>
> >>#  time /sbin/ping -c 5 www.washington.edu
> >>PING www.washington.edu (140.142.3.7): 56 data bytes
> >>64 bytes from 140.142.3.7: icmp_seq=0 ttl=57 time=95.812 ms
> >>64 bytes from 140.142.3.7: icmp_seq=1 ttl=57 time=102.938 ms
> >>64 bytes from 140.142.3.7: icmp_seq=2 ttl=57 time=84.297 ms
> >>64 bytes from 140.142.3.7: icmp_seq=3 ttl=57 time=69.290 ms
> >>64 bytes from 140.142.3.7: icmp_seq=4 ttl=57 time=111.203 ms
> >>
> >>----www.washington.edu PING Statistics----
> >>5 packets transmitted, 5 packets received, 0.0% packet loss
> >>round-trip min/avg/max/stddev = 69.290/92.708/111.203/16.397 ms
> >>   10.70s real     0.06s user     3.35s system
> >
> >What is the system doing for 3.35s for such a light task ? Also, the
> >real time should be 5s, not 10s. Does top or systat vm reveal some
> >high system CPU usage ?
> 
> I didn't really notice that. I did this a few more times (only difference 
> was a different NIC and a reboot).
> 
> 5 packets transmitted, 5 packets received, 0.0% packet loss
> round-trip min/avg/max/stddev = 7.389/66.557/103.288/44.764 ms
>     3.81s real     1.15s user 42949672.67s system
> 
> system time is way off. (The shell's time is from ksh.)
> 
> 
> 5 packets transmitted, 5 packets received, 0.0% packet loss
> round-trip min/avg/max/stddev = 73.813/96.490/120.985/17.926 ms
>    19.15s real     3.32s user     0.10s system
> 
> 19 seconds is slow.
> 
> 5 packets transmitted, 5 packets received, 0.0% packet loss
> round-trip min/avg/max/stddev = 26.357/56.721/94.156/26.613 ms
>     8.25s real     0.13s user     3.57s system
> 
> And another example:
> 
> $ time /sbin/ping -c 5 www.washington.edu
> PING www.washington.edu (140.142.3.35): 56 data bytes
> 64 bytes from 140.142.3.35: icmp_seq=0 ttl=57 time=92.821 ms
> 64 bytes from 140.142.3.35: icmp_seq=1 ttl=57 time=6450.027 ms
> 64 bytes from 140.142.3.35: icmp_seq=2 ttl=57 time=114.192 ms
> 64 bytes from 140.142.3.35: icmp_seq=3 ttl=57 time=-7833.590 ms
> 64 bytes from 140.142.3.35: icmp_seq=4 ttl=57 time=77.477 ms
> 
> ----www.washington.edu PING Statistics----
> 5 packets transmitted, 5 packets received, 0.0% packet loss
> round-trip min/avg/max/stddev = -7833.590/-219.815/6450.027/5068.384 ms
>    14.35s real     0.93s user     1.76s system
> 
> 6450 ms can't be correct and the negative number is wrong too.

It looks like your system clock is not behaving properly. From your dmesg
output, this system should have a CPU cycle counter. Maybe it's one
of these CPU with a broken TSC ? If so, running a 'while (1);' loop (or
anything else that will keep the CPU 100% busy) may help.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--