Live data from Hacker News

Clock synchronization is a nightmare

arpitbhayani.me

1–10 of 165 posts

Re: Clock synchronization is a nightmare

#4
post #3

PTP requires support not only on your network, but also on your peripheral bus and inside your CPU. It can't achieve better-than-NTP results without disabling PCI power saving features and deep CPU sleep states.

You can if you just run PTP (almost) entirely on your NIC. The best PTP implementations take their packet timestamps at the MAC on the NIC and keep time based on that. Nothing about CPU processing is time-critical in that case.

Re: Clock synchronization is a nightmare

#5
post #3

PTP requires support not only on your network, but also on your peripheral bus and inside your CPU. It can't achieve better-than-NTP results without disabling PCI power saving features and deep CPU sleep states.

How so? If the NIC is processing the timestamps as it arrives/leaves on the wire, the latency and jitter in the rest of the system shouldn't matter.

Re: Clock synchronization is a nightmare

#6
Normally I would nod at the title. Having lived it.

But I just watched/listened to a Richard Feynmann talk on the nature of time and clocks and the futility of "synchronizing" clocks. So I'm chuckling a bit. In the general sense, I mean. Yes yes, for practical purposes in the same reference frame on earth, it's difficult but there's hope. Now, in general ... synchronizing two clocks is ... meaningless?

https://www.youtube.com/watch?v=zUHtlXA1f-w

Re: Clock synchronization is a nightmare

#8
I wouldn't say it's a 'nightmare'. It's just more complicated than what regular folk think computers work when it comes to time sync. There's nothing nightmareish or scary about this, it's just using the best solution for your scenario, understanding limitations and adjusting expectations/requirements accordingly, perhaps relaxing consistency requirements.

I worked on the NTP infra for a very large organization some time ago and the starriest thing I found was just how bad some of the clocks were on 'commodity hardware' but this just added a new parameter for triaging hardware for manufacturer replacement.

This is an ok article but it's just so very superficial. It goes too wide for such a deep subject matter.

Re: Clock synchronization is a nightmare

#9
Another protocol that's not mentioned is PPS and its variants, such as WhiteRabbit.

A regular pulse is emitted from a specialized high-precision device, possibly over a specialized high-precision network.

Enables picosecond accuracy (or at least sub-nano).

Post reply on HN