[Fwd: Re: [ntp:questions] Re: drifting on crystal]

Richard B. Gilbert rgilbert88 at comcast.net
Fri Jan 14 04:39:24 UTC 2005


Alain wrote:

>
>> NTP does exactly that.  It measures both the frequency and phase 
>> (time) error of the local clock and attempts to correct both.  When 
>> you lose synchronization,  your local clock should be ticking at very 
>> close to 1 second per second.  The problem is that, over time, the 
>> frequency of the crystal oscillator changes depending on the 
>> temperature, the supply voltage, the age of the crystal, the phases 
>> of the moon and the whims of the gods.  The local clock is not going 
>> to suddenly start gaining or losing thirty seconds per day;
>
>
> I am not an expert in NTP, but I can tell you about cristals: Some
> cristals are *much* better than others. The difference is basically
> about quality an can even be inporoved with temperature stabilyzed ones.
>
> I check my drift files often in two machines: an old P200 (firewall) an
> drift is around 350 and varies a lot (one day I got 270!), the other
> machine is a Toshiba notebook, drift is between 25 and 27. As you can
> imagine the the drift *fluctuation* is the problem.
>
> I don believe that drift is calculated over a one-day period, it is the
> only thing that could improve accuracy as the day's temperature cicle
> tends to repeat. This can be a suggestion for future improvement.
>
> Alain
> PS: I believe that in some Motherbaord the on-board crystal could be
> changed to a temperature stabilyzed one, This could make NTP keep a very
> very stable time.
>
Well, I'm not really an expert on NTP or crystals but I count myself an 
interested amateur!

I agree that crystals vary in quality and likewise the oscillators in 
which they are employed.  Some are very good indeed.   What's used in 
computer clocks, if not actually rejects from the makers of cheap quartz 
watches, might as well be!

I believe that the frequency correction is recorded in the drift file 
hourly rather than being averaged over a twenty-four hour period.  I 
also believe that the correction is calculated at each poll interval 
which could mean anything from every 64 seconds to every 1024 seconds 
(roughly every minute to every seventeen minutes).

I believe that the presumption is that ntpd was restarted, either by 
itself or because the machine was rebooted.   In that case you don't 
really want the daily average as a starting value, you want the best 
available approximation to the correction for right now which would be 
the most recent recorded value.

It should be possible to replace the crystal on your motherboard but it 
would almost certainly void the warranty and you might render the board 
unusable.  Also consider that there is more to the oscillator than the 
crystal.  I believe it would be better to use a well designed add-on 
that was designed for service as an accurate and stable computer 
clock.   There have been such; the Bancomm BC635PCI for instance.  I 
don't know of any in current production but there may be such.  A 
BC635PCI is being auctioned on e-Bay right now!



More information about the questions mailing list