[ntp:questions] drifting on crystal

Brad Knowles brad at stop.mail-abuse.org
Thu Jan 13 00:01:37 UTC 2005

At 11:42 PM +0100 2005-01-12, David Monniaux wrote:

>  1) While ntp works well, it can presumably have an idea of the amount by
>  which the system clock tends to drift (say, "the system clock is 10^-6
>  slower than it should be") compared to reference clocks. Does ntp use this
>  information to compensate the clock when the reference clocks are absent?

	Yes.  The ntpd will calculate a drift value based on previous 
measurements, and continue to use the latest known drift value once 
you have become disconnected.  This may or may not keep your clock 
closer to reality for a longer period of time, but does usually help.

>  2) The machine is in constant use (no powercycles) and within a known
>  temperature range. Can we get an order of magnitude of the drift of the
>  system clock?

	PC clocks are notorious for being really, really bad when left 
undisciplined, even for short periods of time.

	In the kind of environment you describe, you really want to have 
at least an OXCO in the GPS circuit, so that when the GPS signal goes 
down you still have some sort of more reasonable external clock 
reference.  This can be many, many orders of magnitude better than 
typical PC clocks.

	Cesium or Rubidium would be better, but also considerably more 
expensive, more bulky, and a lot less likely to happen.  A decent GPS 
refclock with an integrated OXCO is not out of the realm of 

>  For information, it's running Linux kernel 2.4.22.

	Both Linux and Windows are notorious for dropping interrupts and 
having even worse clocks (by orders of magnitude) than the underlying 
hardware is capable of.

	If you supply a decent GPS refclock with integrated OXCO circuit, 
this may or may not be that much of a problem for you, but I would 
recommend that you at least keep in the back of your mind the idea of 
switching to an OS that doesn't typically have these problems.

Brad Knowles, <brad at stop.mail-abuse.org>

"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."

     -- Benjamin Franklin (1706-1790), reply of the Pennsylvania
     Assembly to the Governor, November 11, 1755

   SAGE member since 1995.  See <http://www.sage.org/> for more info.

More information about the questions mailing list