Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2005 18:30:22 +0800
From:      David Xu <davidxu@freebsd.org>
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:  <4361FDBE.7000500@freebsd.org>
In-Reply-To: <4361FA1C.1070103@freebsd.org>
References:  <30622.1130493370@critter.freebsd.dk> <4361FA1C.1070103@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4361FDBE.7000500>