From owner-freebsd-current@FreeBSD.ORG Thu Jun 16 07:22:56 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2465316A41C for ; Thu, 16 Jun 2005 07:22:56 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (vc4-2-0-66.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id C16F843D1F for ; Thu, 16 Jun 2005 07:22:55 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.3) with ESMTP id j5G7LqDQ033980; Thu, 16 Jun 2005 01:21:52 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 16 Jun 2005 01:23:02 -0600 (MDT) Message-Id: <20050616.012302.48201645.imp@bsdimp.com> To: jeremie@le-hen.org From: "M. Warner Losh" In-Reply-To: <20050616070445.GD2239@obiwan.tataz.chchile.org> References: <20050615231823.GB2239@obiwan.tataz.chchile.org> <20050615.212446.29494502.imp@bsdimp.com> <20050616070445.GD2239@obiwan.tataz.chchile.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: incorrect ping(8) interval with powerd(8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2005 07:22:56 -0000 In message: <20050616070445.GD2239@obiwan.tataz.chchile.org> Jeremie Le Hen writes: : Hi Warner, : : > : %%% : > : jarjarbinks:root# sysctl hw.acpi.acline : > : hw.acpi.acline: 1 : > : jarjarbinks:root# sysctl dev.cpu.0.freq : > : dev.cpu.0.freq: 1735 : > : jarjarbinks:root# time ping -qc 2 192.168.1.1 : > : PING 192.168.1.1 (192.168.1.1): 56 data bytes : > : : > : --- 192.168.1.1 ping statistics --- : > : 2 packets transmitted, 2 packets received, 0% packet loss : > : round-trip min/avg/max/stddev = 0.266/0.269/0.271/0.002 ms : > : : > : real 0m1.003s : > : user 0m0.001s : > : sys 0m0.001s : > : : > : jarjarbinks:root# sysctl hw.acpi.acline : > : hw.acpi.acline: 0 : > : jarjarbinks:root# sysctl dev.cpu.0.freq : > : dev.cpu.0.freq: 216 : > : jarjarbinks:root# time ping -qc 2 192.168.1.1 : > : PING 192.168.1.1 (192.168.1.1): 56 data bytes : > : : > : --- 192.168.1.1 ping statistics --- : > : 2 packets transmitted, 2 packets received, 0% packet loss : > : round-trip min/avg/max/stddev = 0.637/0.814/0.991/0.177 ms : > : : > : real 0m2.252s : > : user 0m0.004s : > : sys 0m0.021s : > : %%% : > : : > : I check ping(8) source code and it appears it uses select(8) to wait : > : the desired amount of time. I don't think this is the intended : > : behaviour. Where does this bug (feature?) come from ? : > : > Those numbers look about right for a 200MHz CPU. : : May you delve into this a little bit more please ? The ping(8) manual : page states that the -i flags makes ping(8) to wait a given couple of : seconds. If I use the flags "-i 1", I expect ECHO Requests to be sent : with one second between each, whatever the AC line status is. : (Note that I didn't explicitely specified "-i 1" in the above example, : but this doesn't change the behaviour.) Well, the rount trip times went way up (3x longer). That's normal for a 200MHz CPU... My 333MHz EISA machine can't do much better than that. But the 2.252s run time is a little longish. Do you see this consistantly? If you ran it a second time would you get identical results. I've seen ARP take a while... What else do you have running on the system? Maybe a daemon that takes almost no time at 1.7GHz takes a lot longer at 200Mhz and that's starving the ping process... Or some driver has gone insane... Warner