Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to synchronize times to millisecond accuracy AND precision between machines?

From what I understand, the crystals on PC's are notorious for clock skew. If clocks are always skewing, what is the best way to synchronize clocks between machines with millisecond accuracy and precision? From what I've found, NTP and PTP are possible solutions, but I was wondering if anybody had any experience on stackoverflow.com!

I understand NTP is the popular choice, but am wondering if anybody has had any experience with PTP (IEEE1588)

like image 676
PiNoYBoY82 Avatar asked Sep 18 '08 23:09

PiNoYBoY82


People also ask

What are the two methods used for time Synchronisation?

For a wired network, two methods of time synchronization are most common. Network Time Protocol and Global Positioning System (GPS) are both used for synchronization. Neither protocol is useful for wireless synchronization. Both require resources not available in wireless networks.

What is accuracy in time synchronization?

Accuracy of about 100 nanoseconds. The time synchronization method used depends mostly on the distance between the equipment that requires synchronization. A connection distance not only involves delay, but also degradation of the signal quality.

How do computers synchronize time?

The network time synchronization process, also called time convergence, occurs throughout a network as each computer accesses time from a more accurate time server. Time convergence involves a process by which an authoritative server provides the current time to client computers in the form of NTP packets.

What is synchronization time?

Time synchronization refers to the distribution of time across clocks in a network. Time synchronization is one way of achieving phase synchronization.


2 Answers

Just run the standard NTP daemon.

It does have options to take input from several GPS devices as well as talking to network servers.

Edit: I was referring to http://www.ntp.org/, not the one that comes with Windows.

I don't have any suggestion as to what NTP clients are best for windows, but for Unix machines there's no real reason to not run NTP.

like image 139
wnoise Avatar answered Sep 17 '22 13:09

wnoise


Here's some 15-year-old software that syncs to within a hundredth of a millisecond. (My team wrote it when NTP wasn't good enough for our lab.)

From the conference paper's abstract: "A distributed clock for networked commodity PC's. With no extra hardware, this clock correlates sensor data from multiple PC's with latency and jitter under 10 microseconds average, 100 microseconds worst case."

Source code: https://github.com/camilleg/clockkit
(Until 2020 Feb 13 it was at http://zx81.isl.uiuc.edu/clockkit/, now offline.)

like image 41
Camille Goudeseune Avatar answered Sep 21 '22 13:09

Camille Goudeseune