[ntp:hackers] Precision of Shared Memory Reference Clock

Terje Mathisen terje at tmsw.no
Wed Feb 24 09:35:24 UTC 2010


Hal Murray wrote:
> There are (at least?) two major considerations;
>
> Suppose the clock is stable.
>
> Suppose I can measure the clock to within 1 microsecond.  If I take
> two measurements 1 second apart, that's 1 part per million.  (I'm
> being sloppy about the second microsecond from the second
> measurement.)  If I take two measurements 100 seconds apart, that's 1
> part per 100 million.  In general, if your clock is stable, you want
> a longer polling interval to do a better job of calculating the
> drift.
>
> But if your clock isn't stable, then you want a short polling
> interval so you can track the wander.

The key is that you want to very the total length of the sample 
interval, but even with an Allen intercept around 1000 seconds 
(poll=10), you would still get an even (at least slightly) better 
measure of the average frequency if you gather as many samples as 
possible and do a least-squares linear fit over all (or most) of them.

NTPD has a pretty short history of just 8 samples, but more recently 
we've seen things like the huffpuff filter which will gather input over 
much longer periods, in order to be able to determine if any given 
sample seems to have suffered from significant one-way delays.

> For most PC type systems, the primary consideration for clock
> stability is temperature.  A system with constant load will track
> room temperature.  (Low load is a convenient constant of zero.)  If
> you have a variable load, the temperature probably tracks the load.

Cyclic AC is the most common cause of drift rate changes for dedicated 
ntp servers in rooms that have AC.
>
> So if you have a system with low load, the clock will look stable and
> ntpd will extend the polling interval.  If you then start doing a lot
> of work, that introduces a step in the temperature which turns into a
> jump in the drift.

Right.

Terje

-- 
- <Terje at tmsw.no>
"almost all programming can be viewed as an exercise in caching"


More information about the hackers mailing list