[lug] Today I learned about... PTP

Bear Giles bgiles at coyotesong.com
Sat Sep 4 16:51:42 MDT 2021


Something some people might find interesting, even useful.

We all know about NTP. We all know we should always configure our systems
to use NTP.

Did you know there's also a "PTP" - "precision time protocol"?

NTP tries to keep system clocks synced within a second - an eternity in
cloud environments.

PTP keeps system clocks synced within a dozen or so *microseconds*.

Obviously this only works at the LAN level - and in fact it requires NIC
support. As always cheaper NICs might not support it, and the latest NICs
might not have support in the kernel. But many do. (You can use 'ethtool'
to get the details for your NIC.)

It also doesn't keep you tightly synced with the rest of the world. For
that you need one of those $1600 "atomic clock" PCIe boards - or the RPi
equivalent that Jeff Geerling created in a youtube video. You need to use
the GPS antenna to get the precise time but the rhodium(?) clock keeps the
time accuracy in the nanonseconds range as long as it can get a satellite
update every few days.

However a lot of us don't need the exact legal time - within a second is
fine - but for log aggregations and the like we could benefit from having
all of the systems on our LAN being sync'd within 100 usec. A lot of
systems only log to millisecond precision so that's more than enough to
ensure that the logs can be safely merged without worrying about clock skew.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20210904/bc17745f/attachment.html>


More information about the LUG mailing list