[ntp:questions] Realistic Performance Expectation for GPS PPS fed ntpd jitter

Miroslav Lichvar mlichvar at redhat.com
Tue Oct 20 07:36:59 UTC 2020


On Mon, Oct 19, 2020 at 12:43:47PM +0200, Vitezslav Samel wrote:
> On Mon, Oct 19, 2020 at 09:49:36AM +0200, Miroslav Lichvar wrote:
> > Not an FPGA, but the Intel I210 costs about $50 and it has a nice
> > hardware clock with PPS input/output, which is well supported in
> > Linux. It's a NIC, so you can use the same clock for timestamping PPS
> > and NTP packets, avoiding any asymmetries on the PCIe bus between the
> > PPS-timestamping hardware, CPU, and the NIC, which allows you to make
> > an NTP server accurate to few tens of nanoseconds.
> 
>   Any pointers/info how to use this in Linux?

In the Linux kernel source there is a testptp utility in the
tools/testing/selftests/ptp directory, which can enable the PPS
input and/or output and print the captured timestamps.

For configuring NTP (chrony), see this blog post from Dan Drown:
https://blog.dan.drown.org/apu2-ntp-server-2/

Note that he uses an onboard variant of the NIC, which doesn't have a
pin header for the SDP and requires some soldering, but that's not an
issue with the I210:
http://linuxptp.sourceforge.net/i210/i210-SDPs.jpg

With the described configuration there is some extra jitter in NTP
timestamps due to the system clock being used as the main clock. If
you wanted to avoid that to improve stability, you would need to patch
chronyd to serve time directly from the hardware clock. Let me know if
you want more details.

If you just want to synchronize the hardware clock to its PPS input,
or you want to provide a PTP service with ptp4l, in the linuxptp
package there is a ts2phc program for that.

-- 
Miroslav Lichvar



More information about the questions mailing list