[Ntp] Re: NTP speed of synchronization question

Martin Burnicki <martin.burnicki@meinberg.de> Wed, 14 August 2024 09:05 UTC

Return-Path: <martin.burnicki@meinberg.de>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 43455C14F6A9 for <ntp@ietfa.amsl.com>; Wed, 14 Aug 2024 02:05:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.106
X-Spam-Level:
X-Spam-Status: No, score=-7.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=meinberg.de
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jsave5B5-hdP for <ntp@ietfa.amsl.com>; Wed, 14 Aug 2024 02:05:08 -0700 (PDT)
Received: from server1b.meinberg.de (server1b.meinberg.de [213.239.234.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4FFE7C15152B for <ntp@ietf.org>; Wed, 14 Aug 2024 02:05:07 -0700 (PDT)
Received: from seppmail.py.meinberg.de (unknown [193.158.22.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by server1b.meinberg.de (Postfix) with ESMTPSA id A26AD3A000E6; Wed, 14 Aug 2024 11:05:04 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meinberg.de; s=d2021; t=1723626304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=hxitjdmApqTUUapfMPvutYAaAGwdYoiYTar/Fq1XDzo=; b=Awq6pwH8s5LoLiPganmz6TC87iPcgWwtNa45xEIO0+bFf313z/RT+CL80w8a5Xa2CH6xRm dgeLEI9svJfFKHYmlw5CIu4qXZXpEqP2/ubg8EOndaYvG1R+obXaRG3rmRKiR1G5KvwxZX 1aOxwZhUaBtJabrlAmplUa+qZZjxEQn59hhdEIWr9QIh57PGACoGp3RCjSN0Cj5krHJYvG I97UOj5ZDTFR60RP2+SLPgmgTim8gvnXWOg5ROI4BRjOtPgGxD7LINpTHKrQon7Q3aNkD3 f9o57AWjN01nBfw9dEqi/iwjg19VAIH5SmeG0b6lu4POX78iFXHtVROersRp6Q==
Received: from seppmail (localhost [127.0.0.1]) by seppmail.py.meinberg.de (Postfix) with SMTP id 4WkMlh3H8Rz36pr; Wed, 14 Aug 2024 11:05:04 +0200 (CEST)
Received: from srv-kerioconnect.py.meinberg.de (srv-kerioconnect.py.meinberg.de [172.16.3.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by seppmail.py.meinberg.de (Postfix) with ESMTPS; Wed, 14 Aug 2024 11:05:03 +0200 (CEST)
X-Footer: bWVpbmJlcmcuZGU=
Received: from localhost ([127.0.0.1]) by srv-kerioconnect.py.meinberg.de with ESMTPSA (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)); Wed, 14 Aug 2024 11:05:02 +0200
Message-ID: <c6d964d5-177a-4f37-838f-d8fdd5399249@meinberg.de>
Date: Wed, 14 Aug 2024 11:05:01 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Toerless Eckert <tte@cs.fau.de>, ntp@ietf.org
References: <ZrxmPeWAKqsIv86j@faui48e.informatik.uni-erlangen.de>
Content-Language: en-US, de-DE
From: Martin Burnicki <martin.burnicki@meinberg.de>
Autocrypt: addr=martin.burnicki@meinberg.de; keydata= xsFNBGA32gQBEAC1J0AwBZG0/jO8bK792zyKT0GryS0TJ35b2R8frC39EMZRdxzqvZIxsoan HVjClfUFef/Z4PP5Cer7LqRBB1dKyBhiWCexgNULDbsV4/VVeUK6Q6oiJN1ZtZyzAHjrXrqa rEK8TfEdbD338ZbSgGBmDFJ0BAJVvUQKrXCbOU8lnkTXbIYGKPQ9RdkOqlx6uS0ZJz2QvDOy pxAIv4qokkvih7yN7CtqbDQ/v/iczI0cUCxL+QlWp8JpGbBi7zV7RKcai3gGKVBlIU0G0JqC eKFBX2XOBlH9y7/eaVSW2nZwX8n+mWDrWswgx0Hlgl3jp3MGjyMGl2tN3SoI1Lu7UQ3FwbYy LlCRuih18RjvGW6+p7+cvVjPgUZXORBo97oZXcU/985qp1GYfnFFx+ARNpsIA736oHKb9Ips KOcqUgmrFBd4cdwXaSZDAkqllkO+Gy9CqIPkXbOhv4v+wqt8tQcvuQUtd6l2KKvzf9MkyuIk HpjvBSMhDuVeY/0+0K02VY9OadmlMp89J5LoF9nBGwWZOcz3dgxhgNcWbfDy+Z+opfdqL1Ph 5G9TeFtaNpn67az1tggn4HYyUeUjSDW0o2KTLhjYzOY7B5KaUnbDQBvkiZMjiDUoL98v3TWI xtnfm+M8n5NoqqIJgfYq+MdlqCKl6Kh5mJkACzrcFbt4RebBQQARAQABzVBNYXJ0aW4gQnVy bmlja2kgKE1laW5iZXJnIEZ1bmt1aHJlbiBHbWJIICYgQ28uIEtHKSA8bWFydGlu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pn9+ZTnJQ2zUHBHFpzoS1oE571S8DIxg+qgaIJZ yICUCZA7y3JNct6A+B3gamHdHZ9BtUmZUgx3hl58S5Q7kNzBDgvszRsYAkliQkB1ltJVhCtT TL6015V2m/tNquojtr9JIY484rB4wMlTTi/LYo73UAryRH5c0GA=
Organization: Meinberg Funkuhren, Bad Pyrmont, Germany
In-Reply-To: <ZrxmPeWAKqsIv86j@faui48e.informatik.uni-erlangen.de>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="------------Wv0yMCWU0ZTs5AZnydIKPKl0"
X-SM-outgoing: yes
Message-ID-Hash: U3CDZQZGJPDRZ2SBS7GG7MND7RPFEYU5
X-Message-ID-Hash: U3CDZQZGJPDRZ2SBS7GG7MND7RPFEYU5
X-MailFrom: martin.burnicki@meinberg.de
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-ntp.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Ntp] Re: NTP speed of synchronization question
List-Id: Network Time Protocol <ntp.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/stTy2-zPJsAk7V2_H_Bxeye9LR8>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Owner: <mailto:ntp-owner@ietf.org>
List-Post: <mailto:ntp@ietf.org>
List-Subscribe: <mailto:ntp-join@ietf.org>
List-Unsubscribe: <mailto:ntp-leave@ietf.org>

Toerless Eckert wrote:
> Dear NTP WG
> 
> I have a few quick ops question against NTP which would take me a lot longer to investigate
> on actual devices. This is for reviewing draft-ietf-bess-evpn-fast-df-recovery which wants
> to utilize clock synchronization between routers.
> 
> Assuming typical high-end routers and their implementation of NTP:

All of the answers to the questions below depend completely on the NTP 
implementation running on the *client*.

> 1. Is there any reasonw why we should NOT be able to achieve synchronization of less than 5 msec ?

Assuming that the time provided the NTP server(s) is sufficiently 
accurate and precise, this should not be a problem if the client runs a 
good NTP implementation. It's the client who has to evaluate the time 
stamps involved in the packet exchange, calculate time offset vs. packet 
delay, identify and discard outliers, etc. See also:
https://kb.meinbergglobal.com/kb/time_sync/time_synchronization_accuracy_with_ntp

A systematic residual time offset may affect the final accuracy if there 
is some asymmetric delay on the network path between the client and the 
server(s), maybe due to different upload and download speeds. See:
https://kb.meinbergglobal.com/kb/time_sync/time_synchronization_errors_caused_by_network_asymmetries

> 2. Assuming synchronization only across some WAN connection, how long would it typically
>     take for a restarting router to synchronize against a peer to that level of accuracy or better ?

It depends on the initial range of the time offset on the client, and 
the way the client compensates the time offset: The time on the client 
can be stepped to the time received from the server(s), or it can be 
slewed fast or slow.

> 3. Would synchronization to a local peer be faster ? If so, how fast could it be ?

Basically, I don't think so, provided that the server responds in time 
and the network connection is stable enough.

The first KB article I mentioned shows that even on a WAN connection 
with a huge network delay the resulting accuracy achieved with ntpd can 
be in the range of 1 ms.

> 4. Am i correct to remember that the accuracy of synchronization should be accessible to
>     user of NTP (such as the aforementioned drafts mechanism) through some diagnostics interface ?
>     ( think to remmeber that to be the case from typical NTP implementation CLI).

It depends on whether the NTP program actually supports this. Again, if 
there is a systematic residual time offset, the client can't report it. 
If the client could determine the offset, it could also compensate it. 
So to detect such systematic offset, you need another reference time 
that is suitable for time comparisons.

Martin
-- 
Martin Burnicki

Senior Software Engineer

MEINBERG Funkuhren GmbH & Co. KG
Email: martin.burnicki@meinberg.de
Phone: +49 5281 9309-414
Linkedin: https://www.linkedin.com/in/martinburnicki/

Lange Wand 9, 31812 Bad Pyrmont, Germany
Amtsgericht Hannover 17HRA 100322
Geschäftsführer/Managing Directors: Natalie Meinberg, Werner Meinberg, 
Andre Hartmann, Heiko Gerstung
Websites: https://www.meinberg.de  https://www.meinbergglobal.com