Date: Thu, 22 Jul 1999 09:59:00 +0200 (SAT) From: John Hay <jhay@mikom.csir.co.za> To: mike@smith.net.au (Mike Smith) Cc: stable@FreeBSD.ORG Subject: Re: Tuning the system's clock Message-ID: <199907220759.JAA11291@zibbi.mikom.csir.co.za> In-Reply-To: <199907220628.XAA01044@dingo.cdrom.com> from Mike Smith at "Jul 21, 1999 11:28:32 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> > > > FreeBSD's internal high-precision clock seems to be based on the > > processor's instruction cycle counter. I've found that on one machine, the > > clock is about 150 ppm fast. So I tried to reduce the machdep.tsc_freq > > value. That was bad -- instant reboot. > > The TSC is calibrated at boot time using the RTC; that calibration is > inherently limited to the accuracy of the RTC. And that is why there is a sysctl to set the frequency. It you have some means to determine the frequency better that what the kernel can do, you can set it with the sysctl. > > > Are the NTP pll values for mult/div documented anywhere? It seems to divide > > before it multiplies, which means that using them for small offsets would > > require high divisors, and hence a loss of accuracy. > > The TSC is ill-suited to precision timekeeping, as the CPU clock > frequency is not particularly precise, nor is it guaranteed to remain > at any given value (many power-management schemes adjust the CPU clock > to control power consumption). The only real use for the TSC is > accounting for total elapsed clock cycles over some code fragment (and > even that's compromised by SMM). > > If you want to do accurate timekeeping on a PC, use add-in hardware > designed for the purpose. You will find nothing in the standard PC > architecture suited to the task. You might want to talk to Poul about > the XRPU hardware that he's been using for this very task. > (phk@freebsd.org) While some of what you say is true, it depends on what you want to do. If you have a dedicated machine that you want to use as a time server, you can just disable the power management stuff. I don't claim that you can get to the accuracies that Poul-Henning is able to achieve with his hardware, but you can get to pretty decent levels with a plain dedicated FreeBSD machine, ntpd and a decent gps like the Oncore UT+. See http://stats.mikom.csir.co.za/ntp/tock/ if you want to see what is possible with such a setup and one directory back for a little more info. John -- John Hay -- John.Hay@mikom.csir.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907220759.JAA11291>