Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2005 22:33:18 +1000
From:      Michael VInce <mv@roq.com>
To:        David Xu <davidxu@freebsd.org>
Cc:        Pertti Kosunen <pertti.kosunen@pp.nic.fi>, Poul-Henning Kamp <phk@phk.freebsd.dk>, current@freebsd.org, "Yuriy N. Shkandybin" <jura@networks.ru>
Subject:   Re: Timers and timing, was: MySQL Performance 6.0rc1
Message-ID:  <43621A8E.1060006@roq.com>
In-Reply-To: <4361FDBE.7000500@freebsd.org>
References:  <30622.1130493370@critter.freebsd.dk>	<4361FA1C.1070103@freebsd.org> <4361FDBE.7000500@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
David Xu wrote:

> David Xu wrote:
>
>> Poul-Henning Kamp wrote:
>>
>>> In message <4361F057.4030904@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.
>>>
>>>
>> I suspect because our time() function in libc uses gettimeofday,
>> this further causes lots of gettimeofday syscall.
>>
>>
> Now, I can confirm mysqld calls time() function lots of time, I have
> changed time() to call clock_gettime, now there is few of gettimeofday 
> in ktrace result, but fully filled by clock_gettime.
> Can we optimize time()? because it only returns second.
> may we just create a syscall to return time_second variable in kernel, 
> this sounds crazy though.
>
Hey guys, I been watching this thread and I can confirm that MySQL and 
the Super-smack benchmark greatly rely on this,
I was able to increase performance %600 by changing 
kern.timecounter.hardware to dummy.

kessel# sysctl kern.timecounter.hardware=dummy
kern.timecounter.hardware: ACPI-fast -> dummy
kessel# super-smack /usr/share/smacks/select-key.smack 10 10000
Query Barrel Report for client smacker1
connect: max=0ms  min=0ms avg= 0ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    200000  0       0       151328.05


kessel# sysctl kern.timecounter.hardware=TSC
kern.timecounter.hardware: dummy -> TSC
kessel# super-smack /usr/share/smacks/select-key.smack 10 10000
Query Barrel Report for client smacker1
connect: max=3ms  min=2ms avg= 2ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    200000  0       0       25739.90

kessel# sysctl kern.timecounter.hardware=ACPI-fast
kern.timecounter.hardware: TSC -> ACPI-fast
kessel# super-smack /usr/share/smacks/select-key.smack 10 10000
Query Barrel Report for client smacker1
connect: max=3ms  min=2ms avg= 2ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    200000  0       0       24070.67




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43621A8E.1060006>