[ntp:questions] Stabilizing the drift file?
David L. Mills
mills at udel.edu
Thu Nov 23 17:00:07 UTC 2006
No, you can't always measure the frequency accurately. It depends on the
initial offset when you start and what happens after the initial
frequency measurement. As most folks don't want to set the clock
directly unless forced, the daemon allows an initial offset of up to the
step threshold (128 ms) and does the best it can after the stepout
interval (900 s). Note that the code carefully separates the frequency
measurement from the time offset measurement, so even after an accurate
frequency measurement the discipline has to wrangle both the time and
frequency when the initial time is as much as 128 ms in error. This
initial transient can take several hours to dissipate.
This could be avoided by forcefully setting the clock at initial
startup, but in some systems the setting function can have a large error
in and of itself. The only workaround would be to disable all
applications until the residual offset was within the tolerance, circa
10 ms. Setting the stepout interval something less (300 s) moves up the
time the discipline is enabled, but brings with additional error due to
the expected error in the offset measurements. For instance, if the
expected error was 10 ms in a 300-s stepout interval, the maximum
frequency error could be as high as 67 PPM. The discipline could take up
to a day to amortize this error.
Juergen.Salm at siemens.com wrote:
> mills at udel.edu wrote :
>>When first starting ntpd without the drift file, by default the state
>>machine takes fifteen minutes to directly compute the initial frequency
>>estimate within about 1 PPM, then enables the native clock discipline
> Hi Dave.
> You statement is correct for the complete variety of platforms ntp
> However, on a Linux system (with at least 1us time resolution) you can
> get reasonable estimates for the drift much faster.
> Have a look at my script in
> Changing the stepout as you proposed should give the same results (on
> Unfortunately, I didn't understand the meaning of 'stepout' from the
> documentation. ;-(
More information about the questions