Timers and timing, was: MySQL Performance 6.0rc1
John-Mark Gurney
gurney_j at resnet.uoregon.edu
Fri Oct 28 13:00:09 PDT 2005
Poul-Henning Kamp wrote this message on Fri, Oct 28, 2005 at 11:56 +0200:
> In message <4361F057.4030904 at pp.nic.fi>, Pertti Kosunen writes:
>
> >Does polling affect to this test?
>
> Not apart from the CPU overhead.
>
> sysctl kern.timecounter.hardware
>
> is much more important.
>
> and all the reports here which fail to include it are mostly
> useless.
hydrogen,ttypa,/tmp,504$grep CPU /var/run/dmesg.boot
CPU: AMD Duron(tm) Processor (1211.94-MHz 686-class CPU)
hydrogen,ttypa,/tmp,501#sysctl kern.timecounter.hardware=TSC
kern.timecounter.hardware: TSC -> TSC
hydrogen,ttypa,/tmp,502#./timer
null function: 0.00165
getpid(): 0.37850
time(): 0.65022
gettimeofday(): 0.60886
hydrogen,ttypa,/tmp,503#sysctl kern.timecounter.hardware=ACPI-fast
kern.timecounter.hardware: TSC -> ACPI-fast
hydrogen,ttypa,/tmp,504#./timer
null function: 0.00165
getpid(): 0.38530
time(): 1.33242
gettimeofday(): 1.33421
I was quite impressed by the speed up using the TSC over ACPI-fast...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-current
mailing list