Hello, I’ve recently registered a machine to serve time through the ntp pool registration process. The Pool’s Manage Server page showed it’s IP at stratum 3 initially, then changed to 2 without me doing anything.
since the initial setup, I added a raspberry pi with gps PPS on a local network that the public server references and uses, as indicated by the * in chronyc sources output:
public udp packets per second to server hovers around 50 continuously. the RPi with PPS is on a local subnet with server config minpoll 1 and maxpoll 3 so they communicate every 2 - 8 seconds.
my questions are:
what algorithm is the monitoring station using to determine stratum number?
will the monitoring station designate a public ntp server as stratum 1? my local PPS referenced RPi should serve as a local stratum 0, making the newly registered ntp server a stratum 1. how does stratum 1 get assigned?
monitoring station was apparently auto assigned. are there others that are closer? can this be specified?
it’s unclear what the scoring system is or how the monitoring systems are chosen and what they look for.
As you already know, the GPS/PPS time source should already be designated as stratum 0, and the RPi which hosts the GPS will be stratum 1. But a lower stratum is not necessary a better time source. If for any reason your chronyd sets time against some other NTP server (that is, not setting time from your local stratum 1 RPi) then your stratum will be the server’s stratum plus 1. If this happens often then your RPi may need some tweak; maybe the GPS signal is not stable enough to produce a timely output…
Well if I am reading this right, you added a “server” to the pool which was getting it’s time from another source, apparently a stratum 2 source if it was being seen as a stratum 3 server. Now you have added a local stratum 1 server that the “server” is getting time from making it a stratum 2 server. That would be the expected behavior and is operating correctly. If you put the RPi on the internet and add it to the pool, then you would be sharing a stratum 1 server with the pool.
Also stratum 0 is the time source, your RPi is not the time source, it is receiving the time from a stratum 0 source the GPS.
NTP uses a hierarchical, semi-layered system of time sources. Each level of this hierarchy is termed a stratum and is assigned a number starting with zero for the reference clock at the top. A server synchronized to a stratum n server runs at stratum n + 1. The number represents the distance from the reference clock and is used to prevent cyclical dependencies in the hierarchy. Stratum is not always an indication of quality or reliability; it is common to find stratum 3 time sources that are higher quality than other stratum 2 time sources.[a] A brief description of strata 0, 1, 2 and 3 is provided below.
Stratum 0
These are high-precision timekeeping devices such as atomic clocks, GPS or other radio clocks. They generate a very accurate pulse per second signal that triggers an interrupt and timestamp on a connected computer. Stratum 0 devices are also known as reference clocks. NTP servers cannot advertise themselves as stratum 0. A stratum field set to 0 in NTP packet indicates an unspecified stratum.[25]
Stratum 1
These are computers whose system time is synchronized to within a few microseconds of their attached stratum 0 devices. Stratum 1 servers may peer with other stratum 1 servers for sanity check and backup.[26] They are also referred to as primary time servers.[2][3]
Stratum 2
These are computers that are synchronized over a network to stratum 1 servers. Often a stratum 2 computer queries several stratum 1 servers. Stratum 2 computers may also peer with other stratum 2 computers to provide more stable and robust time for all devices in the peer group.
Stratum 3
These are computers that are synchronized to stratum 2 servers. They employ the same algorithms for peering and data sampling as stratum 2, and can themselves act as servers for stratum 4 computers, and so on.
hello @csweeney05, this is all correct. I’ve considered putting the RPi in the pool but am uncertain if it can handle the constant 50-100 requests per second without overheating. I could give it a try - just haven’t yet. The Pi is also not my primary concern to keep operating properly. it could go for days without being on and I’d never notice.
@csweeney05, this post is helpful for terminology. the stratum 0 source is the GPS device with PPS. the stratum 1 (RPI) is reading from the stratum 0 source, which makes sense now why the pool server is stratum 2.
also, @stevesommars commented elsewhere that the stratum is not assigned by the pool. it’s a field in each ntp packet, which means stratum is defined by chrony or ntpd based on the upstream servers it’s using for time.
so, even though the public pool server machine is looking at a stratum 1 time server (the Pi) and has very good stability, it will only achieve stratum 2.
I’m comfortable with the current setup. If the Pi dies because of an sd card bonk or other reason then it’s only 1 of several servers the public pool server uses. Other servers will pick up and continue uninterrupted time keeping and allow it to also serve in the pool.