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

From: David Xu <davidxu_at_freebsd.org>
Date: Fri, 28 Oct 2005 18:30:22 +0800
David Xu wrote:
> Poul-Henning Kamp wrote:
> 
>> 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.
>>
>>
> 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.
Received on Fri Oct 28 2005 - 08:30:24 UTC

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