[ntp:questions] problem with ntpd refclock and pps via parallel port

David Lord snews at lordynet.org
Thu Feb 4 02:11:39 UTC 2010

unruh wrote:
> On 2010-02-03, David Lord <snews at lordynet.org> wrote:
>> Hal Murray wrote:
> ..
>> There's also another problem I have to resolve and that is
> ntpd has about a 1 hour half life (it takes an hour to correct the 
> error level by 1/2) for short polling intervals, longer for longer.
> If you hav3 a refclock you are polling at about poll level 4 ( which has
> the 1 hr time scale). the only way ntp knows something has happened is
> that the drift changes the time slowly, and ntp then slowly changes the
> drift rate to try to bring things back into line. that all takes a long
> time.

 From just grep of logs for offset and frequency it's obvious
that's what's happening, offset staying about the same and
frequency being adjusted to compensate but adjustment not being
enough until temperature gradient reverses. Ntpd then rapidly
overshoots and same happens with offset in opposite direction. 
Previously I've had central heating switching on/off several
times a day which has masked that behaviour but this winter the
heating as been on at constant level = max boiler temp and the
behaviour has shown up really well :-(

> Three possibilities. 
> a) if you run linux/bsd, run chrony. It corrects for temp drifts much
> much faster. 

That's out at moment as chrony isn't sufficiently stable and
backwards compatible. From my tests, I'd say offsets are lower
than ntpd by at least a factor of 3. Problem is monitoring
with chronyc requiring same version on remote as chronyd on
server. I've also had complete lockups when attempting to peer
chrony with ntpd.

I've attempted to subscribe to mailing lists and had
confirmation but not seen anything from the list nor seen my
problem reports sent to the lists.

> b) put the computer into a temp controlled box or install a temp
> controlled crystal.

Yep, the stick on uA723 based crystal heater looks easiest to try.

Even better would be an external oscillator as provided for
for on many older motherboards. I'll consider that a better
option if fitting heater requires removal of motherboard from
system and oscillator/xtal looks easy to remove.

> c) get the "temp" patc hfor ntp, which uses an onboard temp sensor ( eg
> the motherboard temp sensor) to correct for the temp variations ( does a
> fit to the temp vs rate and then uses that to correct for the changes in
> temp).


More information about the questions mailing list