[ntp:questions] NTP and PPS calibration interval (convergence speed)

Miguel Gonçalves miguel.barbosa.goncalves at gmail.com
Fri May 24 09:46:22 UTC 2013


Hi!

I've read a lot about the speed of NTP when reacting to changes in
temperature to in turn affect the oscillator.

I am posting my findings and thoughts to the list so it becomes
archived for future users in need of this information.

First, let me say that I have 2 GPS receivers (Garmin 18 LVC -
10.0.2.2 - on the roof and Sure GPS board - 10.0.2.4 - on a window
facing South) connected to identical (both ALIX 1D boards) and
dedicated machines just for NTP. I am running 4.2.6p5 on both. I also
have a Meinberg NTP server (10.0.2.1) in the same LAN segment. This
configuration gives me 3 clocks one of which (Meinberg) I use to check
the performance of the others.

The 3 servers use minpoll 4 maxpoll 4 for their refclocks and each one
lists the other two as servers with minpoll and maxpoll set to 4.

For me, it is not clear why calibration occurs every 256 seconds when
I have a GPS receiver with a PPS output. I understand that a good
frequency drift estimation would be good when free running but frankly
I don't want my NTP servers to serve time when the GPS signal is not
available. I can trust my Meinberg box to do that because it has a
TXCO but not my regular NTP servers.

I was also surprised that Meinberg's NTP server calibration interval
never goes above 4 seconds. They must have done what I did.

I changed my FreeBSD 8.3 kernel to never go above 4 seconds and the
results are in the graphics attached.

I changed PPS_FAVGDEF in the file /sys/kern/kern_ntptime.c from the
default 8 (256 seconds) to 2 (4 seconds). The frequency is therefore
adjusted every 4 seconds instead of 256.

Here are some ntpq billboards


(Meinberg NTP server)

freebsd8# ntpq -p 10.0.2.1
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 LOCAL(0)        .LOCL.          10 l   12   16  377    0.000    0.000   0.002
+GENERIC(0)      .GPS.            0 l   14   16  377    0.000   -0.001   0.002
oPPS(0)          .PPS.            0 l    1   16  377    0.000   -0.001   0.002
-10.0.2.2        .PPS.            1 u    4   16  377    0.162   -0.005   0.011
+10.0.2.4        .PPS.            1 u   10   16  377    0.158   -0.003   0.006


(Garmin 18 LVC on the roof)

freebsd8# ntpq -p 10.0.2.2
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
oGPS_NMEA(0)     .PPS.            0 l   11   16  377    0.000    0.000   0.004
+10.0.2.1        .PPS.            1 u    8   16  377    0.148    0.004   0.005
+10.0.2.4        .PPS.            1 u    7   16  377    0.132   -0.003   0.004


(Sure GPS board on the window)

freebsd8# ntpq -p 10.0.2.4
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
oGPS_NMEA(0)     .PPS.            0 l   13   16  377    0.000    0.000   0.004
+10.0.2.1        .PPS.            1 u   10   16  377    0.161    0.004   0.006
+10.0.2.2        .PPS.            1 u    9   16  377    0.139    0.002   0.004



Hope this helps someone.

Regards,
Miguel


More information about the questions mailing list