[ntp:questions] IEEE 1588 (PTP) at the nanosecond level?

William Unruh unruh at invalid.ca
Mon Mar 17 17:24:37 UTC 2014


On 2014-03-17, Martin Burnicki <martin.burnicki at meinberg.de> wrote:
> William Unruh wrote:
>> On 2014-03-16, Joe Gwinn <joegwinn at comcast.net> wrote:
>>> I keep seeing claims that Precision Time Protocol (IEEE 1588-2008) can
>>> achieve sub-microsecond to nanosecond-level synchronization over
>>> ethernet (with the right hardware to be sure).
>>>
>>> I've been reading IEEE 1588-2008, and they do talk of one nanosecond,
>>> but that's the standard, and aspirational paper is not practical
>>> hardware running in a realistic system.
>>
>> 1ns is silly. However 10s of ns are possible. It is achieved by Radio
>> Astronomy networks with special hardware (but usually post facto)
>
> Why should 1 ns be silly?

>
> If you have a counter chain clocked by 20 MHz then the timestamps 
> captured when PTP packets are going out or are coming in have a 
> resolution of 50 ns.

I am not saying that a computer or a piece of hardware cannot have a 1
ns resoltuion. I am saying that imagining that I can sychronize two such
clocks over the network or via gps is. 

>
> If your hardware can be clocked a 1 GHz then the resolution could be 
> increase to 1 ns.
>
> Of course I know high resolution is not the only thing you need for high 
> accuracy, but it's a precondition.
>
> You'd need hardware (FPGA?) which can be clocked at 1 GHz, and even in 
> the hardware signal processing you'd need to account for a number of 
> signal propagation delays which you can eventually ignore at lower clock 
> rates.
>
> So of course the effort becomes much higher if you want more accuracy, 
> but this is always the case, even if you compare NTP to the "time" 
> protocol, or PTP to NTP.
>
>>> I've seen some papers reporting tens to hundreds of nanoseconds average
>>> sync error, but for datasets that might have 100 points, and even then
>>> there are many outliers.
>>>
>>> I'm getting PTP questions on this from hopeful system designers.  These
>>> systems already run NTP, and achieve millisecond level sync errors.
>>
>> Uh, perhaps show them to achievement of microsecond level sync errors?
>> That is already a factor of 1000 better than they achieve.
>>
>> One of the key problems is getting the packets onto the network (delays
>> withing the ethernet card) special hardware on teh cards which
>> timestamps the sending and receiveing of packets on both ends could do
>> better.a But it also depends on the routers and switches between the two
>> systems.
>
> Of course all involved network nodes needed to be able to timestamp at 
> this high resolution, otherwise the overall accuracy would be degraded.
>
> And, it would probably be easier to achieve this accuracy with an 
> embedded device with dedicated hardware than with a a standard PC and a 
> NIC connected via the PCI bus.
>
> If there were a 1 GHz oscillator on the NIC used for timestamping then 
> you still have to provide a way to relate the timestamps from the NIC to 
> your local system time. If the only way to do this is via the (PCI?) bus 
> then the accuracy could suffer from bus latency, arbitration, etc.
>
> On a dedicated hardware the same oscillator/high resolution counter 
> chain could be used for system timekeeping, and to timestamp network 
> packets, which makes things much easier.
>
>
> Martin



More information about the questions mailing list