[ntp:questions] NTP with GPS and RTC

unruh unruh at invalid.ca
Fri Apr 26 18:09:38 UTC 2013


On 2013-04-26, Steve Kostecke <kostecke at ntp.org> wrote:
> On 2013-04-26, Biebaut Sven <sven.biebaut at be.thalesgroup.com> wrote:
>
>>ATTRIBUTION MISSING said:
>>
>>>Biebaut Sven wrote:
>>
>>>> If I drop the idea of the RTC as a reference clock, am I correct in
>>>+ stating that, when there is no external synchronisation:
>>>> - my local clock and my RTC will drift away from each other, but at
>>>+ least my RTC will be closer to the mark (the DS3231 is chosen for its
>>>+ precision)
>>
>>>Probably not.  ntpd will continue to apply first order frequency 
>>>correction to the local clock.  
>>
>> Ah, I did not realise that. So a system with ntpd but without an external 
>> reference clock would still be more accurate than a system without ntpd 
>> at all ?
>
> Only if ntpd has had access to a real local reference clock, or to
> remote time servers, for a long enough period of time to calculate the
> frequency correction. And the ambient conditions and system load match
> that which existed when the correction was determined.
>
Yes, this is important. You need 5-10 hours of connection for ntpd to
settle down to its "best" timekeeping. If the system load changes, it
heats up the computer making it worse. There do exist versions of ntpd
which have incorporated temperature compensation-- they measure the temp
of the system using any of the on-board termometers, and derive the
sensititivity of the onboard clock to temperature changes. They then use
that to continually alter the rate of the clock to compensate for those
temperature drifts. So those may be a better way to go if your system is
being installed in a thermally fluctuating environment.  Noone has
created such an addon for chrony yet, but it might be even more
effective as chrony is  more sensitive to determining short term frequency
changes than is ntpd. (ie, if you daily have a big job that runs for an
hour and increases the internal temperature, ntpd will be very slow to
respond to the frequency change caused by that temp spike, and thus to
being able to measure the effect of the temp on the frequency. ntpd
takes hours ( or once it has settled down to poll 10, days) to notice
that things have changed. (poll 10 means 2^10 sec= 10^3 sec=1/3 hour,
and since ntpd throws away 7 of 8 polls, that means it is effectively
making a measurement every 3 hours. Then it only slowly responds to
maintain stability of the local clock.) 

chrony will respond much faster. It would be interesting for someone to
install a temperature compensation into chrony to see how it responded.
But that does not help you.





More information about the questions mailing list