[ntp:questions] NTPD can take 10 hours to achieve stability

Mike S mikes at flatsurface.com
Tue Apr 19 00:09:38 UTC 2011

At 07:25 PM 4/18/2011, Chuck Swiger wrote...
>On Apr 18, 2011, at 2:54 PM, C BlacK wrote:
> > Thanks for all the great answers.  Now for a harder question, how 
> does the accuracy of the local clock source affect the accuracy of 
> ntpd.
>Normally, except for stratum-1 NTP servers which are specifically 
>configured to use a high-quality local timesource (ie, GPS, ACTS, WWV, 
>atomic clocks, etc), the local clock isn't used at all.

Of course it is. Don't confuse the RTC used for power-off timekeeping 
(or the "local" NTP driver) with the clock source used for 
timekeeping while operating. NTP doesn't keep time, it keeps the local 
clock source _in time_. NTP itself doesn't have an accuracy, one is 
concerned with how accurately it keeps the local clock in sync. If the 
local clock source is moving around, then NTP is constantly "chasing" 
it to try and keep it in sync. This has to have an effect on accuracy.

In the case of Linux, the local clock source is whatever is driving the 
kernel clock (tsc, hpet, acpi_pm, etc.). "cat 
/sys/devices/system/clocksource/clocksource0/current_clocksource" if 
you want to see what a modern Linux box is using. These are all subject 
to errors in accuracy. These are almost universally driven by 
not-so-good crystals (but there's probably someone here driving their's 
with a Cs), and subject to significant temperature drifts. My best NTP 
server swings about 0.01 ppm with normal household temperature changes 
(~1 C), my worst one about 0.1 ppm, and that's pretty good. I'd expect 
PC crystals to be spec'd no better than 20 ppm for 0-50 C, if that, or 
0.4 ppm/C.

More information about the questions mailing list