1

I have two RPis running on the same network, with the same Internet access. One of them is a B and the other one a B+ model. Both run the same distro with ntp enabled for quite a long time (this is to say that ntp had time to stabilize)

ntpq -p on each of them looks different, though:

B+:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+vps.jre655.com  103.1.106.69     2 u 1922 1024  376  430.041  -83.669  31.648
-bertrand.lfbsi. 194.177.34.118   3 u  492 1024  377   60.881  -14.222 100.617
*ntp1.m-online.n 212.18.1.106     2 u  519 1024  377  153.250  -54.473  60.916
+v.bsod.fr       138.195.130.62   3 u  464 1024  377  165.340  -47.092  60.011

B:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*server6.webster 193.190.230.65   2 u  653 1024  377   30.511   -0.418   0.477
+chimay.drazzib. 213.251.128.249  2 u  819 1024  377   26.110    0.720   0.651
+mail.nexxea.com 225.7.21.157     3 u  804 1024  377   29.410   -0.917   2.779
-ip-46-105-189-2 181.92.40.112    3 u  863 1024  377   29.524   -1.160   0.684

Why such a difference? I am asking out of curiosity (ntp does its job on keeping the time right)

Clarification: I understand how ntp works and that there are better and worse servers. What surprises me is

  • for a small variation of results on a given RPi,
  • how these results differ between the two RPis
WoJ
  • 545
  • 2
  • 6
  • 15
  • hey are defaulting to the "pools" instead of going to the master clock at time.nist.gov... The pools are junk. Here is how to use the official master clock: https://raspberrypi.stackexchange.com/questions/68811/how-do-i-set-raspbian-to-use-the-primary-time-server-time-nist-gov/68812 – SDsolar Sep 25 '17 at 07:20

4 Answers4

2

Each device will be connected to a random selection of NTP servers to automatically load-balance the overall system.

Otherwise the temptation would be for everyone to connect to the same tier 1 servers.

joan
  • 71,024
  • 5
  • 73
  • 106
  • yes, I know that (I will clarify in the question). What I wonder is why the offset/jitter/delay is so different for each of them, with a small variance of servers per RPi (for instance jitter 30-100 on one of them, and 0.4 to 3 on the other) – WoJ Jan 28 '15 at 08:59
  • No idea. Is one of your Pi's connected wired and the other wirelessly? – joan Jan 28 '15 at 09:01
  • no, both are wired – WoJ Jan 28 '15 at 09:01
1

Sounds like a variation on Segal's Law. If you are running at least one R Pi 24/7, then that one could be made to be the ntp server for the other/s. This would also make for a slightly better netizen by less poking of the busy ntp pool.

Also, ntpq is a snapshot, which cannot give a full picture. I monitor my ntp system with NTPviz which produces lots of graphs/analyses from the ntp logs and shows my R Pi to be long term consistent. Strictly, NTPviz only works with the forked version of ntp (NTPsec) but the two are currently (2016) compatible.

Chiny
  • 11
  • 4
  • Upvote. That is definitely the next step in my system. I use time.nist.gov right now, according to https://raspberrypi.stackexchange.com/questions/68811/how-do-i-set-raspbian-to-use-the-primary-time-server-time-nist-gov/68812 and have set up my GPS according to https://raspberrypi.stackexchange.com/questions/68816/how-can-i-set-up-my-g-mouse-usb-gps-for-use-with-raspbian with the goal of setting up my own master server that is even more accurate than anything you can get on the Internet. Google data centers have GPS and a master atomic clock: https://www.wired.com/2012/09/google-spanner/ – SDsolar Jun 23 '17 at 07:38
0

Look at the delay column for B+, the configured servers seem to be on the other side of the globe. Are you using 1.COUNTRY-CODE.pool.ntp.org ?

dfc
  • 126
  • 4
  • Thank you. I clearly overthought that without thinking about the obvious reason. I was using the stock (debian) servers instead of the geographic ones. – WoJ Jan 30 '15 at 08:13
0

The "pools" that are set up with the standard stock installs of Raspbian and ubuntu and all Windows computers are many hops away from the Stratum-1 Master Clock.

Often the pools are Stratum-16.

This means that it is a crapshoot as to whether they are getting the correct time. It can vary by quite a bit.

The solution is to use the Stratum-1 Master clock.

Here is a Q&A on this Stack Exchange that explains how to make the change:

How do I set Raspbian to use the primary time server time.nist.gov?

It is quick and easy.

SDsolar
  • 2,348
  • 8
  • 25
  • 43