Re: [Ntp] Consensus call: NTPv5 and leap second smearing

Harlan Stenn <stenn@nwtime.org> Mon, 10 July 2023 23:26 UTC

Return-Path: <stenn@nwtime.org>
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 A101FC17CE9C for <ntp@ietfa.amsl.com>; Mon, 10 Jul 2023 16:26:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
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 mVTE0vM2LIcl for <ntp@ietfa.amsl.com>; Mon, 10 Jul 2023 16:25:58 -0700 (PDT)
Received: from chessie.everett.org (chessie.fmt1.pfcs.com [IPv6:2001:470:1:205::234]) by ietfa.amsl.com (Postfix) with ESMTP id 7D735C17EB4C for <ntp@ietf.org>; Mon, 10 Jul 2023 16:25:58 -0700 (PDT)
Received: from [10.208.75.149] (075-139-201-040.res.spectrum.com [75.139.201.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by chessie.everett.org (Postfix) with ESMTPSA id 4R0Kr46wXwzMQJd; Mon, 10 Jul 2023 23:25:56 +0000 (UTC)
Message-ID: <3642691b-1b80-bc9c-f86a-ecd78c72e40f@nwtime.org>
Date: Mon, 10 Jul 2023 16:25:55 -0700
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0
Content-Language: en-US
To: Martin Burnicki <martin.burnicki=40meinberg.de@dmarc.ietf.org>, Denis Reilly <dreilly=40equinix.com@dmarc.ietf.org>, Doug Arnold <doug.arnold=40meinberg-usa.com@dmarc.ietf.org>, Dieter Sibold <dsibold.ietf@gmail.com>, Danny Mayer <mayer@pdmconsulting.net>
Cc: "ntp@ietf.org" <ntp@ietf.org>
References: <29343948-036E-4514-8B42-689C19A61813@gmail.com> <a9370de7-ee50-a468-48e7-696ed7d8b586@pdmconsulting.net> <1d9e274e-9697-93ed-8d78-20a105aad397@nwtime.org> <29ffd221-73f6-795d-e10b-8f4ba3ebf0c2@pdmconsulting.net> <10EB1ECC-2CC7-41A0-99F0-5AEADCEF3257@gmail.com> <AM7PR02MB57657DB5F70C44ECB55FD847CF2CA@AM7PR02MB5765.eurprd02.prod.outlook.com> <DM8PR04MB7799A067BD253527355C2FCAA133A@DM8PR04MB7799.namprd04.prod.outlook.com> <364db739-1ebc-9ffa-c200-db21aeb3f693@meinberg.de>
From: Harlan Stenn <stenn@nwtime.org>
In-Reply-To: <364db739-1ebc-9ffa-c200-db21aeb3f693@meinberg.de>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/aRXwjW95sKZ6X1aPnNVImBg-vKE>
Subject: Re: [Ntp] Consensus call: NTPv5 and leap second smearing
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Network Time Protocol <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Jul 2023 23:26:02 -0000

On 7/10/2023 12:57 AM, Martin Burnicki wrote:
> Denis Reilly wrote:
>> Hello,
>>
>> Paul Gear wrote:
>>
>>> The reason smearing gets used under current NTP versions is because 
>>> the people using it have large-scale issues with timestamp-sensitive 
>>> software, and it's more efficient to implement the smearing on the  
>>> servers than on the clients, which can be orders of magnitude greater 
>> in terms of scale.  If we prevent this, we will only hinder the 
>> adoption of newer versions.
>>
>> I agree, but I think that hiding the smearing process in the timestamp 
>> is not optimal, because it prevents client interoperability between 
>> smearing and non-smearing servers. (We had to add a clause in the BCP 
>> about that.) I can see a use case where an organization that wants to 
>> implement server-side leap smearing in this fashion might still want 
>> to configure an independent non-smearing service somewhere in their 
>> hierarchy as a check on their timebase.
>>
>> Doug pointed out below that in the current draft the offset to UTC 
>> must be supplied when smeared time is distributed. If we have that, 
>> then what do we gain by sending the smeared time? I think we are 
>> better off sending UTC timestamps all the time, then using the 
>> smearing offset to modify the time as realized at the client. It would 
>> involve no additional config on the part of v5 clients, just some more 
>> math in the implementation. But it would enable this interoperability 
>> between smearing and non-smearing sources of time, because the UTC 
>> time from all servers is more easily accessible for comparisons.
>>
>> So I would support language that is a bit different than Paul's:
>>
>> - A server MUST send UTC timestamps.
> 
> Tell this also the NIST guys who operate servers that continuously send 
> UT1 instead of UTC. ;-)

Judah tells me that the NIST systems that offer UT1 time have a refid of 
NUT1, so there's no problem there.

H
--

> The intention is surely that all clients athat are configured to poll 
> these server have their system time run on UT1 rather than UTC.
> 
> We also have customers who expect that our LANTIME NTP servers send raw 
> GPS time instead of UTC because they have NTP clients that are expected 
> to have their system time be aligned to GPS time.
> 
>> - A server MUST provide indication (via an extension) of whether 
>> clients are meant to smear the leap second, and of the current 
>> UTC-to-smeared-time offset.
> 
> As said before, at least ntpd from ntp.org already provides an 
> indication that the "normal" timestamps contain smeared time, and can 
> use that (if required and desired) to compute UTC.
> 
> "Dumb" clients won't do that, and that's exactly the purpose of 
> server-side smearing.
> 
> It's similar to the IEEE (IRIG-like) time codes: the transmitted time 
> may be local time with an offset to UTC, but there's a data field 
> included that provides the current UTC/local time offset offset.
> 
> So dumb wall clocks that are not aware of the additional data field 
> simply display the transmitted local time, while more sophisticated time 
> code receivers can easily convert the transmitted time back to UTC, if 
> required.
> 
>> - A client that receives leap smearing information from a server and 
>> has no local leap smearing configuration MUST use the server’s 
>> configuration.
>>
>> - Clients MAY override the servers' leap smearing configuration with 
>> its own local configuration:
>>
>>    - to turn off leap smearing even if the server wants it to
>>
>>    - to apply its own leap smearing algorithm regardless of what the 
>> server is sending
>>
>> - Clients that are implementing leap smearing MUST NOT apply the leap 
>> second time jump, even if they are getting the LI bits from a 
>> non-smearing server.
>>
>> If we allow servers to send smeared timestamps in v5, as Paul 
>> proposes, then we will need to either codify all the current BCP 
>> restrictions prohibiting using smeared and non-smeared servers 
>> together (but only when sending smeared timestamps), or implementors 
>> need to take the time to specifically pull out the smeared offset 
>> before comparing these sources (but only when sending smeared 
>> timestamps). It seems simpler to me to just put all the timestamps in 
>> UTC, and the path forward then has a lot fewer conditionals.
> 
> There are simple NTP clients out there which just poll the time from a 
> server and set the local time. Do you really think such dumb clients 
> will implement anything of these proposals?
> 
>> There is an interesting side case: what happens if a client is 
>> listening to several smearing servers, each with a different 
>> algorithm? Maybe that’s purely academic if most people use the same 
>> algorithm. That seems difficult to resolve, but might be impossible if 
>> you are hiding the smearing adjustment in the timestamps, like we do 
>> now. (In fact, the current BCP says that if you are smearing, it's up 
>> to you to make sure all your servers are configured with the same 
>> algorithm, which we can surely improve upon in V5….)
> 
> That's a known problem, but I think the only way to keep this "clean" is 
> that an administrator carefully specifies the servers to be used.
> 
> Smearing is just a hack to avoid time steps at the client side, and I 
> bet that all the optional stuff mentioned above will even increase the 
> confusion about smearing instead of making things easier.
> 
> 
> Martin
> 
> _______________________________________________
> ntp mailing list
> ntp@ietf.org
> https://www.ietf.org/mailman/listinfo/ntp

-- 
Harlan Stenn <stenn@nwtime.org>
http://networktimefoundation.org - be a member!