[ntp:questions] Speed of ntp convergence

Unruh unruh-spam at physics.ubc.ca
Sun Dec 28 08:26:21 UTC 2008


mayer at ntp.isc.org (Danny Mayer) writes:

>Richard B. Gilbert wrote:
>> Unruh wrote:
>>> I should NOT have to check up on the drift file to see if it is correct.
>>> That is the computer's job. ntp should NOT take 10 hours to correct a wrong
>>> drift file. With a 16 sec poll, ntp should NOT have a 1 hour time constant.
>> 
>> Your opinion!  The designers/developers evidently disagree.

>Not necessarily. The question that you need to ask is how do you *know*
>that the drift file is correct? Remember that at boot time the system
>has no concept of what the correct time is, never mind the frequency. If
>the system has been powered down for a while, ie cold, the frequency
>corrections may need to be different, but you have no way of knowing
>this from within ntpd (or any other application). The drift file
>contains data from the system at a steady state but on startup it's
>hardily steady.

>The question of correcting errors is a separate question but we
>generally  recommend that people use the -g option to ntpd to ensure a
>quick correction which allows an unbounded step of the clock. This will
>not normally affect applications on the system if iburst is used for
>external servers.

Unfortunately it will only step the clock if the time is out by more than
128ms. If less, it will trundle on using the frequency alterations to bring
the clock back into line. 

And if it is the frequency that is out ( as it always will be these days of
linux because of the bugs in the kernel frequency standardisation) then
that one step will not kick in until about an hour later ( and the system
could die a horrible death, because the phase offset intially is corrected
and if the freq is off by enough, the clock will rapidly diverge until it
is out by 128ms again, and ntp will die).


What I was complaining about was that if the clock freq is out, the time
constant, even with a poll level of 4 (16 sec poll interval), is an hour.
That is 200 times longer than the poll interval. Now we need a factor of 8
because ntp only uses one of 8 poll results, and another factor of 2 for
other stuff. That still makes the time constant about 10 times longer than
I think it should be. 



>Danny




More information about the questions mailing list