Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2013 11:52:58 +0200
From:      Daan Vreeken <Daan@vitsch.nl>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Sawtooth ping RTT on RPi
Message-ID:  <201305081153.00407.Daan@vitsch.nl>
In-Reply-To: <20130508085901.GA90732@server.rulingia.com>
References:  <1368004745-2722398601.ad1d31edc9@bliksem.vehosting.nl> <20130508085901.GA90732@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Peter,

On Wednesday 08 May 2013 10:59:01 Peter Jeremy wrote:
> I've noticed a sawtooth-shaped cyclic pattern in ping RTTs to my RPi
> (running r249590M):
> 64 bytes from 192.168.123.231: icmp_seq=22 ttl=64 time=1.321 ms
> 64 bytes from 192.168.123.231: icmp_seq=23 ttl=64 time=10.312 ms
> 64 bytes from 192.168.123.231: icmp_seq=24 ttl=64 time=9.328 ms
> 64 bytes from 192.168.123.231: icmp_seq=25 ttl=64 time=8.335 ms
> 64 bytes from 192.168.123.231: icmp_seq=26 ttl=64 time=7.411 ms
> 64 bytes from 192.168.123.231: icmp_seq=27 ttl=64 time=6.448 ms
> 64 bytes from 192.168.123.231: icmp_seq=28 ttl=64 time=5.497 ms
> 64 bytes from 192.168.123.231: icmp_seq=29 ttl=64 time=4.508 ms
> 64 bytes from 192.168.123.231: icmp_seq=30 ttl=64 time=3.540 ms
> 64 bytes from 192.168.123.231: icmp_seq=31 ttl=64 time=2.588 ms
> 64 bytes from 192.168.123.231: icmp_seq=32 ttl=64 time=1.635 ms
> 64 bytes from 192.168.123.231: icmp_seq=33 ttl=64 time=0.738 ms
> 64 bytes from 192.168.123.231: icmp_seq=34 ttl=64 time=9.770 ms
> 64 bytes from 192.168.123.231: icmp_seq=35 ttl=64 time=8.805 ms
> 64 bytes from 192.168.123.231: icmp_seq=36 ttl=64 time=7.833 ms
> 64 bytes from 192.168.123.231: icmp_seq=37 ttl=64 time=6.843 ms
> 64 bytes from 192.168.123.231: icmp_seq=38 ttl=64 time=5.869 ms
>
> This doesn't appear with Linux (which has a RTT of 0.42ms with
> very little variance).
>
> What is causing the RTT pattern on FreeBSD?
> Haw does Linux manage to respond so much faster?

This would typically be caused by something polling for packets every 10ms 
(instead of using an interrupt to gather the packet(s) right at the moment 
they are received).
Sometimes your echo request is sent just before a polling interval and you'll 
see a low RTT. Sometimes the echo request is sent just after a polling 
interval and the response will only be sent after the next polling interval, 
increasing the RTT by the polling interval (which seems to be 10ms here).
When you're pinging continuously, you'll see the RTT vary between the two 
extremes as shown above.

To summarize: I guess FreeBSD uses polling (at 100Hz) instead of interrupts 
for the (USB connected?) Ethernet port on the RPi.


Regards,
-- 
Ing. Daan Vreeken
Vitsch Electronics
http://Vitsch.nl/
http://VitschVPN.nl/
tel: +31-(0)40-7113051
KvK nr: 17174380
--
Machines en netwerken op afstand beheren? Vitsch VPN oplossing!
Kijk voor meer informatie op: http://www.VitschVPN.nl/



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