From owner-freebsd-current@FreeBSD.ORG Thu Oct 27 23:52:19 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from [127.0.0.1] (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 5639416A420; Thu, 27 Oct 2005 23:52:16 +0000 (GMT) (envelope-from davidxu@freebsd.org) Message-ID: <4361683E.7040504@freebsd.org> Date: Fri, 28 Oct 2005 07:52:30 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.10) Gecko/20050806 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Kirkwood References: <21137.1130401220@critter.freebsd.dk> <00a801c5dacf$db3b7700$6504010a@Jura> <43613541.7030009@mac.com> <43615BBB.2080702@paradise.net.nz> In-Reply-To: <43615BBB.2080702@paradise.net.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org, "Yuriy N. Shkandybin" 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: Thu, 27 Oct 2005 23:52:19 -0000 Mark Kirkwood wrote: > 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? > > null function: 0.01578 > getpid(): 0.49136 > time(): 0.83031 > gettimeofday(): 0.78838 > > However, we are still slower than Linux :-(. > > [Running a pretty much stock kernel, except for: > > #cpu I486_CPU > #cpu I586_CPU > > and timer.c is compiled w/o any optimization.] > > cheers > > Mark > > Athlon64 3000+: null function: 0.00555 getpid(): 0.19302 time(): 1.67033 gettimeofday(): 1.67799 Dual PIII 1Ghz: null function: 0.01140 getpid(): 0.50887 time(): 1.17125 gettimeofday(): 1.12016 Don't know why PIII's gettimeofday is faster than Athlon64 ? note that I turned of Cool and Quiet. David Xu