From owner-freebsd-current@FreeBSD.ORG Fri Oct 28 11:46:44 2005 Return-Path: X-Original-To: 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 263DC16A41F; Fri, 28 Oct 2005 11:46:44 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from linda-2.paradise.net.nz (bm-2a.paradise.net.nz [203.96.152.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id B08DC43D45; Fri, 28 Oct 2005 11:46:43 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from smtp-2.paradise.net.nz (tclsnelbe2-src-nat-1 [203.96.152.177]) by linda-2.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IP200L9FJDU90@linda-2.paradise.net.nz>; Sat, 29 Oct 2005 00:46:42 +1300 (NZDT) Received: from [192.168.1.11] (218-101-45-127.paradise.net.nz [218.101.45.127]) by smtp-2.paradise.net.nz (Postfix) with ESMTP id 5BAECA24B38; Sat, 29 Oct 2005 00:46:42 +1300 (NZDT) Date: Sat, 29 Oct 2005 00:46:24 +1300 From: Mark Kirkwood In-reply-to: <28339.1130477343@critter.freebsd.dk> To: Poul-Henning Kamp Message-id: <43620F90.1020401@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050726) References: <28339.1130477343@critter.freebsd.dk> Cc: David Xu , "Yuriy N. Shkandybin" , current@freebsd.org Subject: Re: Timers and timing, was: MySQL Performance 6.0rc1 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: Fri, 28 Oct 2005 11:46:44 -0000 Poul-Henning Kamp wrote: > In message <43615BBB.2080702@paradise.net.nz>, Mark Kirkwood writes: > >>Chuck Swiger wrote: >> >> >>>FreeBSD 5.4-STABLE i386 >>> null function: 0.01278 >>> getpid(): 0.51329 >>> time(): 2.54771 >>> gettimeofday(): 2.54982 >>> >> >>Chuck - very interesting results. I happen to have a PIII 1Ghz running >>5.4-RELEASE so thought it would be interesting to reproduce your >>numbers. My null and getpid pretty much do, but the time functions seem >>much quicker on my machine - some sort of regression in 5.4-STABLE maybe? > > > No, different timecounter hardware. > > Use > sysctl kern.timecounter > to see what your hardware uses. > Excellent - thanks for clearing that up that confusion (err... that I was helping to propagate ...sorry). e.g: on the 2xPIII 1Ghz Tyan (6.0-RC1): $ sysctl -w kern.timecounter.hardware=TSC $ ./timer null function: 0.01140 getpid(): 0.51597 time(): 0.80246 gettimeofday(): 0.74953 $ sysctl -w kern.timecounter.hardware=i8254 $ ./timer null function: 0.01152 getpid(): 0.52081 time(): 5.26879 gettimeofday(): 5.23759 Cheers Mark