[ntp:questions] Sub-millisecond NTP synchronization for local network

Unruh unruh-spam at physics.ubc.ca
Fri Dec 5 18:04:48 UTC 2008


Jon =?utf-8?Q?K=C3=A5re?= Hellan <dev at null.com> writes:

>leibs at willowgarage.com (Jeremy Leibs) writes:

>> Our configuration is 4 machines connected on a local gigabit network located
>> on a mobile robotic base.  These machines are subject to frequently being
>> powered down or restarted.  In order to use the robot, the clocks on these
>> machines must be self-synchronized to less than 1 millisecond.  Ping times
>> between machines on this local network vary between 100 microseconds, and
>> 1ms depending on saturation of the network by sensor data streams.

>I suspect that ntp may be the wrong solution to this. I've had two
>computers mounted in the same rack, both running ntp. One was GPS
>synchronized, the other synched to the first one over the network. The
>network was wired ethernet and a switch, all lightly loaded. Estimated
>error in the GPS synchronized computer was about 1 us, but it was
>several ms on the network synchronized one. With a more suitable
>computer, the results would probably have been better, but I don't
>think 1 ms over a general purpose network is feasible.

There was something very very wrong with your system then. Getting
20microseconds over a local net is easy. On a local net, the delay should
only be about 100microseconds, certainly not milliseconds. Your system had
something about it that was completely messed up. What operating system?
were they directly wired together or did they go via a switch located in
Tonga? What was the ping time from one machine to the other?



>I've never tried PTP (IEEE 1588), but according to the description, it
>is designed to solve exactly the problem you're facing.

>A solution which lets you use ntp is to synchronize it to a wired PPS
>(pulse per second) signal distributed to all your computers. ntp
>performs very well when it's PPS synchronized - I've never seen worse
>than 10 us estimated error. Distributing PPS to many receivers
>requires a little bit of electronics, but it's very simple. The beauty
>of electronics is that timing is a lot more predictable than with
>operating systems.

Agreed.


>Jon KÃ¥re Hellan, UNINETT, Trondheim, Norway




More information about the questions mailing list