MySQL, ntpd, and kern.timecounter

John Nielsen lists at jnielsen.net
Mon Jun 5 17:36:08 UTC 2006


I have a FreeBSD 6.1 machine set up as a web and MySQL database server. Since 
the application is a bit database-intensive, I followed several of the MySQL 
tuning recommendations from this page:

http://wikitest.freebsd.org/MySQL

One of those was to change kern.timecounter.choice from ACPI-fast to TSC.

That was fine for MySQL, but the real-world timekeeping on this hardware with 
TSC is so bad that it broke ntpd and the clock started drifting several 
seconds every hour. Timekeeping with ACPI-fast was quite reliable.

I'm looking for recommendations in general, but I'll pose a few specific 
questions below as well.

Should I change the timecounter back? How big an impact does the choice of 
timecounter have on performance with MySQL 4.1.19 and FreeBSD 6.1? Is there a 
conservative way I can answer this question myself for a server that's 
already in production?

Can ntpd be coaxed into working with such bad timekeeping (as long as it's 
consistently bad)?

Would Bad Things happen if I ran ntpdate or ntpd -q once or twice a day? Would 
this be considered an abuse of the ntp server(s)? Would I run a risk of 
confusing / breaking cron or sendmail or syslogd or anything else with the 
time jumps?

All input appreciated.

Thanks!

JN


More information about the freebsd-stable mailing list