Posted by fortran77 5 hours ago
In general Pi-s are relatively bad for timekeeping. Not just the NIC (which can be replaced by hats with their own), there are also oscillator replacement mods[2] to work around this to some extent. Though all this still leaves many other sources of timekeeping error.
So if the goal is low-cost precise timekeeping, one can assemble something FPGA-based[2] for quite a bit less money, that can reach very low noise figures. You can spend the remaining money on the GNSS antenna and receiver instead.
I'm also sure a FPGA-based approach could be taken even further with some external timekeeping chips available and the FPGA could just do the NTP/PTP protocol stuff.
[0]: https://www.youtube.com/watch?v=zxK0_j2Ah2I [1]: https://raspberrypi.stackexchange.com/questions/74482/switch... [2]: https://fy.chalmers.se/~f96hajo/fakernet/board_Arty_A7-35-GP...
If you want to chase lower, you need a hardware-disciplined clock. Either through FPGA, or in the case of my Time Pi, I have a PTP NIC with a PHC disciplined from the ublox F9T—which should be within 5-20ns of GPS time. This can be measured on higher-end boards like the TimeHAT by comparing PPS out from the GNSS module, PPS from the NIC, and PPS from a separate GPSDO, along with a timestamp comparison tool like the tinyGTC or TAPR TICC: https://tapr.org/product/tapr-ticc/
The annoying thing is there are few PC hardware combos that include the relevant PPS and frequency outputs to allow actual verification of your time in hardware. Software can show numbers but even on my Pi dashboard, the sub-20ns sync reported is between the system clock and the NIC PHC... but not currently accounting for the delay when the kernel reads the PHC over PCIe.
Pi could support PTM on its PCIe bus, that would be awesome. Overkill for 99.9% of its market though!
Anyways, I use NTPSec- which is the default these days on Debian when you apt-get install NTP. I’ve not tried Chrony, but I see it mentioned all the time.
I’m curious what others here are running and their thoughts on the pros and cons?
Edit: I forgot to add, one of my favorite parts of being in the pool is basically a free uptime monitor of my ISP. There have been multiple cases where I see a blip in my offset then a full blown ISP outage within 78 hours of the blip, then a return to my normal offsets after to outage has resolved.
There are also a lot of people who buy old Spectracom or other 'enterprise' time servers since they can be had for low hundreds of dollars with some nice features like rubidium or OCXO oscillators, so they can hold over time much more accurately when GPS is down, or upstream NTP providers are unreachable.
And regarding chrony, it's the default in many distros now, I like some of its built-in monitoring and clock adjustments, it just feels easier to manage if you want more than just base NTP features. It also supports hardware timestamping if you have network hardware that has it, which IIRC NTPd doesn't? I haven't messed with systemd-timesyncd or ntpd-rs, so can't say much on them.
I still personally wouldn't try to run an NTP server on a VM unless I also owned/controlled the bare metal hardware the hypervisor is running on.
Some decent discussion on this topic (though with broken links to a separate NTP Pool discussion) here: https://a.osmarks.net/content/serverfault.com_en_all_2022-11...
I wonder why the wall clock on top is 10 seconds ahead of the bottom one?
I have a solution to that I'm working on—Pico W that grabs time from NTP then broadcasts about 1m with a tiny antenna so I can set my wall clock and watch (the one with the green band in the picture).
METAS is the Federal Institute of Metrology.
However using a pool is the better way IMHO.
Or go Stratum 1 via DCF77 https://zeit.ptb.de/
Over the past few weeks I bumped it up to 50, then 100, and now it's at 250 Mbit. At 100 Mbit I was seeing 180-250 requests/sec. At 250 (just switched earlier this morning) I'm seeing 500-600 requests/sec.
I'm monitoring things on the server with chronytop[1], a tool I whipped up with Claude since I didn't see any other concise dashboards and hated `watch`ing chronyc sources to get any kind of updated data.