[ntp:questions] 500ppm - is it too small?

Unruh unruh-spam at physics.ubc.ca
Mon Aug 17 22:36:10 UTC 2009


Evandro Menezes <evandro at mailinator.com> writes:

>On Aug 17, 8:15=A0am, Steve Kostecke <koste... at ntp.org> wrote:
>>
>> ./config.h:#define PRESET_TICKADJ 500/hz
>> ./include/ntp_proto.h:#define NTP_MAXFREQ =A0 =A0 500e-6
>> ./include/ntpsim.h:#define =A0 =A0 =A0SLEW =A0 =A0500e-6 =A0/* correction=
> rate (PPM) */

>In my point of view, limiting the slew to 500PPM is more critical than
>handling marginal crystals.  I now see that although they have the
>same value, they don't have to.  Or is it assumed elsewhere in the
>code that they do?

The problem is that ntp's design does not independently determine the
drift and the required slew. It only knows the instantaneous rate and 
 uses the offset to change the rate. For the two to be
different, ntp would have to do a drift rate estimate independently of
the slew required to get rid of the offset. While chrony does exactly
that, ntp does not-- there is simply one instantaneous rate which is
changed by the current offset and then forgotten. Ie, ntp has a very
very limited memory (Markovian). It remembers only one thing, the
current rate. Thus it cannot differentiate between the drift of the
clock and slewing required to eliminate the offset. The key difference
between the ntp reference and chrony lies precisely in that, so chrony
has two things-- the drift rate of the clock and the slew rate to
eliminate the offset. Both the drift rate and the offset are estimated
using the last N ( where N varies depending on the circumstances)
measurements of the offset. The offset is eliminated by rapid slewing,
the drift rate is corrected by altering the timing of the clock. 

In short, they have to have the same value in ntp because that is the
only value there is in the theory.


>TIA




More information about the questions mailing list