[chrony-users] PHC and source selection

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Hello,

I have a server running chrony, using a PHC refclock which is PTP-synced via ptp4l and also 3 NTP servers in its config. When my PTP source is not in-sync with GPS time it starts drifting, and you can see the effect of this in chrony on my server as follows (below is when it has drifted ~550us):

210 Number of sources = 4
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          1   2   377     4    +17ns[   +5ns] +/-  523ns
^- asia1                            1   6   377    56   +559us[ +560us] +/-   43ms
^- asia2                            1   6   377    56   +565us[ +567us] +/-   50ms
^- asia3                            1   6   377    51   +565us[ +567us] +/-   50ms

My question is, why does chrony not select a different source in this scenario? It has 3 other NTP servers that are perfectly good, and all seem to agree on the true time. Is it because the estimated error of the NTP servers are all ~50ms?
These NTP servers are geographically far away (100ms ping), but they themselves are synchronised from GPS sources, so their estimated error shouldn't be half of their network latency, they are much more accurate than that. Shouldn't the jitter of their measurements matter more than their latency?
As far as I can see there is no way to influence the estimated error of an NTP time source - is this correct?
Ideally when my local PHC0 source is 500us away from the agreed time from the other 3 sources, it would get marked as bad.

Thanks!
Ross

chrony tracking:
Reference ID    : 50484330 (PHC0)
Stratum         : 2
Ref time (UTC)  : Thu Jul 22 16:22:59 2021
System time     : 0.000000029 seconds fast of NTP time
Last offset     : +0.000000001 seconds
RMS offset      : 0.000000042 seconds
Frequency       : 13.066 ppm fast
Residual freq   : +0.000 ppm
Skew            : 0.005 ppm
Root delay      : 0.000000500 seconds
Root dispersion : 0.000004934 seconds
Update interval : 4.0 seconds
Leap status     : Normal

The config for chrony is like so:
"
makestep 1 3
rtcsync
hwtimestamp *

driftfile /var/lib/chrony/drift
logdir /var/log/chrony
log rawmeasurements statistics tracking refclocks

leapsectz right/UTC
refclock PHC /dev/ptp0 poll 2 tai delay 500e-9 precision 1e-9 stratum 1

server asia1 minpoll 4 maxpoll 6 iburst
server asia2 minpoll 4 maxpoll 6 iburst
server asia3 minpoll 4 maxpoll 6 iburst
"

and the ptp4l command:
ptp4l -m -f /etc/ptp4l.conf -i nic0

cat /etc/ptp4l.conf:
[global]
clock_servo linreg
delay_mechanism E2E
slaveOnly 1
domainNumber 0






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/