Re: [ntp:questions] How is the BIG guys (Google. FB etc) DNS and NTP architecture

2020-10-20 Thread William Unruh
On 2020-10-21, CRasch Net  wrote:
> Facebook is now using Chrony, you can read about their implementation:
>
> Building a more accurate time service at Facebook scale
> https://engineering.fb.com/production-engineering/ntp-service/

Interesting. While I agree that chrony is more precise, I think that
their results for ntpd are worse than they should  be. ntpd can
certainly do better than 1ms scatter/accuracy (and chrony can do better
than 100us.There is something weird about their network paths.) About 10
years I ran a number of tests of chrony vs ntpd. and got about a fctor
of 3-10 better, not 100. Interrupt latency/clock reading for chrony gave
about 1us fluctuations.

I find this whole thing about leap second smoothing to be a real farce.
Just let the step occur instead of delivering the wrong time for hours.
Or if you want, run your clocks on TIA not UTC and make the leapsecond
conversion in the interpretation as is done for timezones. Would anyone
advise leap day smoothing every 4 years so that we do not have trouble
with our calenders?

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


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

2020-10-20 Thread Miroslav Lichvar
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

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions