From owner-freebsd-arm@FreeBSD.ORG Wed May 8 09:53:05 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 409EF90C for ; Wed, 8 May 2013 09:53:05 +0000 (UTC) (envelope-from Daan@vitsch.nl) Received: from Prakkezator.VEHosting.nl (Prakkezator6.VEHosting.nl [IPv6:2001:1af8:2100:b020::142]) by mx1.freebsd.org (Postfix) with ESMTP id BBBB524A for ; Wed, 8 May 2013 09:53:04 +0000 (UTC) Received: from [192.168.72.13] (124-54.bbned.dsl.internl.net [92.254.54.124]) (authenticated bits=0) by Prakkezator.VEHosting.nl (8.14.2/8.14.2) with ESMTP id r489r0lU082198; Wed, 8 May 2013 11:53:01 +0200 (CEST) (envelope-from Daan@vitsch.nl) From: Daan Vreeken Organization: Daan - Vitsch Electronics To: Peter Jeremy Subject: Re: Sawtooth ping RTT on RPi Date: Wed, 8 May 2013 11:52:58 +0200 User-Agent: KMail/1.9.10 References: <1368004745-2722398601.ad1d31edc9@bliksem.vehosting.nl> <20130508085901.GA90732@server.rulingia.com> In-Reply-To: <20130508085901.GA90732@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201305081153.00407.Daan@vitsch.nl> x-ve-auth-version: mi-1.1.7 2011-02-21 - Copyright (c) 2008, 2011 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on Prakkezator.VEHosting.nl Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 May 2013 09:53:05 -0000 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/