Re: Timers and timing, was: MySQL Performance 6.0rc1

From: Mark Kirkwood <markir_at_paradise.net.nz>
Date: Sat, 29 Oct 2005 00:46:24 +1300
Poul-Henning Kamp wrote:
> In message <43615BBB.2080702_at_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
Received on Fri Oct 28 2005 - 09:46:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:46 UTC