[ntp:questions] Slow convergence of NTP with GPS/PPS
unruh-spam at physics.ubc.ca
Fri Oct 24 17:41:30 UTC 2008
"Richard B. Gilbert" <rgilbert88 at comcast.net> writes:
>David J Taylor wrote:
>> Richard B. Gilbert wrote:
>>> And ntpd could take many minutes to bludgeon the local clock into
>>> submission! It's easy to determine and set the correct time. It's
>>> less easy to determine and set the correct frequency and thus KEEP the
>>> correct time.
>> Wasn't the OP looking for about 0.5s accuracy? Ah, no, that was someone
>> else. Here we're aiming for:
>> "Our application requires good time accuracy (better than 5ms) but it
>> also needs to get there quickly (as quickly as possible, but ideally
>> taking no more than about 15 minutes)."
>> I would have thought that a GPS and NTP would have been able to achieve
>> that, at least with a current drift file.
>Try it some time! Ntpd makes a mad dash for zero offset, overshoots,
>and then "rings" for a while. Eventually it gets that tight synch that
>we like to see but it does take about thirty minutes.
>I think I mentioned this here at the time I observed it. I believe that
>I also remarked that I could have done it a lot faster by hand if I had
>the "control knobs".
a) The clock filter means that 7/8 of the data points get tossed. That
means that it is 128 sec between data points. Ntp must have a damping time
longer than that. and is about twice that. Ie, the error is reduced by
approximately 1/e in that damping time. Ie, if the original error was 30
ms, it will be about 12mx after 4 min, 5 after 8 min,.... but that is for
offset errors. For frequency errors it is worse. First it has to wait for
the frequency actually to create an offset error, and then start to fix
it so frequency offsets take even longer to damp out.
b) Yes, you might have been able to do it faster, but it is unclear.
Remember what ntpo does is correct errors only by changing the frequency of
the clock. Ie, the only knob you are allowed to twidle is the frequency
knob. That is tougher. (It is like driving-- If you find yourself driving
on the wrong side of the road, all you can change is the direction the car
is driving not its position. It is really really easy to overshoot and find
yourself in the ditch. ntp is designed NOT to land in the ditch, ever. That
means it is conservative in its stearing.
More information about the questions