10

I like to synchronize the timing of two computers that are connected via Ethernet (with no router in between) and apart from each other 100 or so meters. There are several protocols that does time sycnh based on my research but the timing accuracy is not clear. The timing delta I target is less than 10usec. Could this be achieved via Ethernet with careful software planning?

My computers are running Linux and I control every single line of code, therefore I can make the drivers/applications such that during the synch event they may run deterministic code as opposed to an open OS where I have no control over which tasks are active.

migrated from electronics.stackexchange.com Apr 25 '16 at 14:35

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • 1
    Isn't that about the length of interrupt latency on Linux? What do you intend to do with the highly accurate clock sync? – pjc50 Apr 25 '16 at 9:57
  • 1
    NTP will let you achieve at most 1ms accuracy, over a local network. PTP or GPS is the way to go. Why do you need so good synchronization? – Rafał Rawicki Apr 25 '16 at 14:38
20

Take a look at PTP, it can achieve microsecond accuracy over LAN.

Alternatively, you could buy a pair of GPS receivers which generate a tick interrupt every second. GPS time precision is about 40 ns.

  • 1
    The Linux PTP Project – Bence Kaulics Apr 25 '16 at 11:54
  • Note that PTP requires hardware timestamping within the network interface for the highest accuracy (and of course a software stack which supports this functionality). Also, if the computers are connected via a switch, it should act as a transparent clock - which also requires hardware support. – sblair Apr 25 '16 at 18:46
  • 1
    Alternatively, buy one GPS receiver and feed the same PPS signal (the "tick interrupt every second") to each computer. Or any other PPS source. [GPS receivers aren't that expensive, but sometimes the clear view of sky requirement is!] – derobert Apr 27 '16 at 19:24
  • @derobert clear sky view is only required to get a fix. My GPS receiver with 1cm² patch antenna gets the satellite time practically everywhere in the house (except the basement). But it's a fair remark, I bet some datacenters are like my basement in terms of GPS reception. – Dmitry Grigoryev Apr 27 '16 at 20:18
  • 1
    @DmitryGrigoryev Depends on how the place is built. E.g., I'm on the top floor at work—nothing above me except the roof. But the roof is metal, and most GPS receivers can't see a single satellite here. So installing a GPS timing receiver here would require mounting an antenna outside, running cable to it, etc. I just wanted to point out the alternatives, in case OP (or a future reader) has a situation like at work here. – derobert Apr 27 '16 at 20:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.