[ntp:questions] [ntpwg] Idea to improve ntpd accuracy

Martin Burnicki martin.burnicki at meinberg.de
Fri Feb 26 13:21:47 UTC 2016


Tal Mizrahi wrote:
> Hi,
> 
> I believe NTP hardware timestamping is certainly a very interesting direction.
> It is certainly worth taking a look at https://datatracker.ietf.org/doc/draft-ietf-ntp-checksum-trailer
> 
> I wonder what is the level of accuracy you are looking for.
> 
> The factor that affects the NTP client's accuracy more than anything else is the distance (latency) between the NTP server and the NTP client, which is roughly proportional to the delay variation.
> If the NTP server and the NTP client are on the same LAN, I would estimate that you can achieve an accuracy on the order of tens of microseconds with software timestamping. In this case hardware timestamping may improve the accuracy.
> If the latency between the NTP server and client is tens of *milliseconds*, then hardware timestamping will hardly affect the accuracy.
> 
> Please note that even if you have hardware-based timestamping, using a hardware clock in the NIC, you still need to synchronize the hardware clock with the system clock (for example, this can be done using phc2sys). This procedure will typically add some inaccuracy to the overall calculation...

And the remaining problem will be that there are switches and routers
which do hardware timestamping on PTP packets to measure the latency of
forwarded packets, but (AFAIK) there are no such devices which can do
this with NTP packets.

So even if both end nodes support hardware timestamping, the result will
unfortunately still be worse than with PTP.

>>>>> What if the poll response packet contained a flag or indication of
>>>>> some sort which means "this is an approximate transmit timestamp".
>>>>> That packet would then be immediately followed by a second response
>>>>> packet with a more accurate transmit time. The second packet could
>>>>> be otherwise identical to the first, or it could be a new flavor of
>>>>> packet that contained only the transmit time (that would save on network
>> bandwidth).
>>>>>
> 
> Sounds a bit like interleave mode, right (a bit similar to PTP two-step clocks)?

But the problem is still that (again, AFAIK) NTP interleave mode works
only in broadcast mode.

In broadcast mode ntpd only tries to measure the packet delay when the
association is first created, but the network route etc. can change at
any time, so IMO interleave mode provides only limited benefit.

Please let me know if I'm missing something.

Martin
-- 
Martin Burnicki

Senior Software Engineer

MEINBERG Funkuhren GmbH & Co. KG
Email: martin.burnicki at meinberg.de
Phone: +49 (0)5281 9309-14
Fax: +49 (0)5281 9309-30

Lange Wand 9, 31812 Bad Pyrmont, Germany
Amtsgericht Hannover 17HRA 100322
Geschäftsführer/Managing Directors: Günter Meinberg, Werner Meinberg,
Andre Hartmann, Heiko Gerstung
Web: http://www.meinberg.de


More information about the questions mailing list