Practical Limits of Linux Time Synchronization: GPS Accuracy and Hardware Constraints
By
signa11
Pure flour-power. Hearty enough to carry you through lunch.
Summary
This technical article explores the practical limits of time synchronization accuracy on Linux systems using NTP and GPS sources. The author shares findings from extensive testing, revealing that GPS receivers typically show 200ns differences between units, network complexity adds 200-300ns systemic error, and hardware quality significantly impacts timing precision. The author achieves 500ns synchronization across most systems, which meets their distributed tracing needs but falls short of initial expectations of 1-10μs accuracy.
Key quotes
· 5 pulledGPSes don't return perfect time. I routinely see up to 200 ns differences between the 3 GPSes on my desk when viewing their output on an oscilloscope.
Even small amounts of network complexity can easily add 200-300 ns of systemic error to your measurements.
Different NICs and their drivers vary widely on how good they are for sub-microsecond timing.
A lot of Linux systems are terrible at low-latency work. There are a lot of causes for this, but one of the biggest is random 'stalls' due to the system's SMBIOS running to handle power management.
All in all, I'm able to sync clocks to within 500 ns or so on the bulk of the systems on my network. That's good enough for my purposes, but it's not as good as I'd expected to see.
You might also wanna read
Bootc and OSTree: Modern Approaches to Linux System Deployment and Configuration Management
The article explores using Bootc and OSTree as modern solutions for Linux system deployment, focusing on achieving reproducible, consistent
systemd v259 Announces Deprecation of System V Service Scripts, Removal Planned for v260
systemd v259 announces the deprecation and upcoming removal of System V service script support in v260, requiring users to migrate to native
Technical Analysis and Critique of D-Bus Implementation in Linux Systems
The article is a technical critique of D-Bus, a message bus system used in Linux desktop environments. The author acknowledges D-Bus's usefu
Linux Input Stack Architecture: A Comprehensive Technical Overview
This comprehensive technical article provides an in-depth architectural overview of the Linux input stack, explaining how input devices and
Improving Raspberry Pi NTP Server Stability Through Thermal Management
The article details a technical investigation into improving Raspberry Pi NTP server stability by addressing thermal management issues. The
Systemd cgroup driver bug: containerd CPU quota calculation mismatch causes container creation failures
The article describes a technical bug in container orchestration systems where using the systemd cgroup driver with a CPU limit of 4096m cau
