[ntp:questions] Setting the maximum rate of change

Spoon devnull at localhost.com
Mon Mar 19 15:50:58 UTC 2007


Hello everyone,

Is there a run-time parameter in NTP that defines the maximum rate at 
which the clock can be adjusted (slewed?).

Is there a run-time parameter in NTP that defines the maximum rate at 
which the previous parameter can change?

Here's why I ask:

I'm working with a standard that deals with 27 MHz clocks, and that 
standard states that the frequency must not change faster than 75 mHz 
per second.

I'll try and think aloud, in case someone can see through my confusion.

Consider H : a 26,999,900 Hz clock.

Thus H has an offset of 100 Hz = 3.7 ppm

In other words, H "misses" 100 ticks every second.

I'd have to add 100 / 27e6 = 3.7 µs every second to keep H from drifting 
away from the correct time.

But I can't make that change all of a sudden, I can only change 0.075 Hz 
more (2.78 ns) every second.

The 1st second, I'd add 2.78 ns.
The 2nd second, I'd add 5.56 ns.
The Nth second, I'd add 2.78*N ns.

Until I reach 3.7 µs for N = 1333

Then I'd have to correct the amount H drifted while the adjustment 
slowly crept to the correct value.

NB: my OS is Linux 2.6

http://www.ntp.org/ntpfaq/NTP-s-algo.htm#Q-CLOCK-DISCIPLINE
http://www.die.net/doc/linux/man/man8/adjtimex.8.html

# ntpq -p
     remote     refid      st t when poll reach   delay   offset  jitter
========================================================================
*10.11.12.66   LOCAL(1)   13 u   24   32  377    0.123    0.004   0.003

# adjtimex -p
          mode: 0
        offset: 3
     frequency: 4483200
      maxerror: 66258
      esterror: 1
        status: 1
time_constant: 5
     precision: 1
     tolerance: 33554432
          tick: 10000
      raw time:  1174319208s 988507us = 1174319208.988507

Apparently, the value of HZ has an influence on these values?

Would I improve precision if I changed HZ from 100 to 250?

Regards.




More information about the questions mailing list