Kevin P. Fleming
2021-05-20 18:09:29 UTC
(apologize in advance for the length of this post, it's a bit of a
brain-dump <G>)
I've got a machine running Debian Testing, with Chrony 4.0-8 and GPSD
3.22-3. It has a U-blox NEO-M8N connected via USB (for NMEA/U-blox
messages only, fed into GPSD which then provides GPS time over SHM).
In addition, the PPS signal output from that module has been connected
to SDP0 on one of the Intel I210 NICs, so that it can be used as a PHC
input.
I've been looking for a few days for information about how to set this
up properly, but it's been challenging since everything I can find
assumes that the user wants to use PTP (generally via the linuxptp
project), but I don't... I'm just using the PHC as a
low-latency/low-jitter path to receive the PPS pulses.
Here's what I've got in chrony.conf now (for testing, so 'noselect' is
intentional):
refclock SHM 0 refid GPS noselect precision 1e-1 poll 8 filter 1000
refclock PHC /dev/ptp3:extpps:nocrossts refid PPS pps precision 1e-7
poll 8 filter 1000
pool us.pool.ntp.org iburst
The 'precision', 'poll 8', and 'filter 1000' settings came from the
GPSD setup/tuning guide, to characterize the behavior of the GPS and
PPS refclocks.
After letting the system run for about 8 hours, this is the result:
'chrony sources'
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS 0 8 377 278 +77ms[ +77ms] +/- 100ms
#x PPS 0 8 377 222 +52ms[ +52ms] +/- 3505us
^- time.cloudflare.com 3 10 377 315 +100us[ +100us] +/- 7210us
^* clock.nyc.he.net 1 10 377 360 -429us[ -516us] +/- 3100us
^- li432-123.members.linode> 2 10 377 300 -946us[ -946us] +/- 70ms
^- linode.ibendit.com 3 10 377 882 -1218us[-1302us] +/- 85ms
'chrony sourcestats'
Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
==============================================================================
GPS 6 3 21m +3.896 3.216 +78ms 399us
PPS 7 5 25m -0.228 0.042 +52ms 7737ns
time.cloudflare.com 7 5 103m -0.139 0.210 -153us 176us
clock.nyc.he.net 11 8 172m -0.001 0.138 -438ns 312us
li432-123.members.linode> 8 5 120m -0.139 0.460 -1915us 535us
linode.ibendit.com 7 5 103m -0.173 0.426 -1160us 350us
As best I can tell, the GPS and PPS refclocks are quite stable (Std
Dev is very low), but the Offsets are a bit weird, and the PPS
refclock must have the wrong 'base time' because Chrony has decided it
is a falseticker.
If it helps, the PPS signal from the U-blox module is a 100ms pulse,
and I think that explains the '100ms' Last sample variation in the GPS
refclock. I can investigate whether it is possible to adjust the
offset of the pulse's leading edge related to the top-of-second to
eliminate that.
When Direct PHC is being used, how does the PHC's base clock get set?
Does Chrony do that? I'm not concerned about disciplining the PHC's
clock because its frequency appears to be very close to perfect now
:-)
I'm hoping to not have to add ptp4l/phc2sys/timemaster/etc. to this
configuration, since that will add complexity, and I can't quite
figure out to configure them to work in a mode where PTP is not
actually being used :-)
brain-dump <G>)
I've got a machine running Debian Testing, with Chrony 4.0-8 and GPSD
3.22-3. It has a U-blox NEO-M8N connected via USB (for NMEA/U-blox
messages only, fed into GPSD which then provides GPS time over SHM).
In addition, the PPS signal output from that module has been connected
to SDP0 on one of the Intel I210 NICs, so that it can be used as a PHC
input.
I've been looking for a few days for information about how to set this
up properly, but it's been challenging since everything I can find
assumes that the user wants to use PTP (generally via the linuxptp
project), but I don't... I'm just using the PHC as a
low-latency/low-jitter path to receive the PPS pulses.
Here's what I've got in chrony.conf now (for testing, so 'noselect' is
intentional):
refclock SHM 0 refid GPS noselect precision 1e-1 poll 8 filter 1000
refclock PHC /dev/ptp3:extpps:nocrossts refid PPS pps precision 1e-7
poll 8 filter 1000
pool us.pool.ntp.org iburst
The 'precision', 'poll 8', and 'filter 1000' settings came from the
GPSD setup/tuning guide, to characterize the behavior of the GPS and
PPS refclocks.
After letting the system run for about 8 hours, this is the result:
'chrony sources'
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS 0 8 377 278 +77ms[ +77ms] +/- 100ms
#x PPS 0 8 377 222 +52ms[ +52ms] +/- 3505us
^- time.cloudflare.com 3 10 377 315 +100us[ +100us] +/- 7210us
^* clock.nyc.he.net 1 10 377 360 -429us[ -516us] +/- 3100us
^- li432-123.members.linode> 2 10 377 300 -946us[ -946us] +/- 70ms
^- linode.ibendit.com 3 10 377 882 -1218us[-1302us] +/- 85ms
'chrony sourcestats'
Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
==============================================================================
GPS 6 3 21m +3.896 3.216 +78ms 399us
PPS 7 5 25m -0.228 0.042 +52ms 7737ns
time.cloudflare.com 7 5 103m -0.139 0.210 -153us 176us
clock.nyc.he.net 11 8 172m -0.001 0.138 -438ns 312us
li432-123.members.linode> 8 5 120m -0.139 0.460 -1915us 535us
linode.ibendit.com 7 5 103m -0.173 0.426 -1160us 350us
As best I can tell, the GPS and PPS refclocks are quite stable (Std
Dev is very low), but the Offsets are a bit weird, and the PPS
refclock must have the wrong 'base time' because Chrony has decided it
is a falseticker.
If it helps, the PPS signal from the U-blox module is a 100ms pulse,
and I think that explains the '100ms' Last sample variation in the GPS
refclock. I can investigate whether it is possible to adjust the
offset of the pulse's leading edge related to the top-of-second to
eliminate that.
When Direct PHC is being used, how does the PHC's base clock get set?
Does Chrony do that? I'm not concerned about disciplining the PHC's
clock because its frequency appears to be very close to perfect now
:-)
I'm hoping to not have to add ptp4l/phc2sys/timemaster/etc. to this
configuration, since that will add complexity, and I can't quite
figure out to configure them to work in a mode where PTP is not
actually being used :-)
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.