Re: [Ntp] CLOCK_TAI (was NTPv5: big picture)

Magnus Danielson <magnus@rubidium.se> Tue, 05 January 2021 23:53 UTC

Return-Path: <magnus@rubidium.se>
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 9D68A3A0EA4 for <ntp@ietfa.amsl.com>; Tue, 5 Jan 2021 15:53:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.361
X-Spam-Level:
X-Spam-Status: No, score=-2.361 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, NICE_REPLY_A=-0.262, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rubidium.se
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0inBhv0O0qQN for <ntp@ietfa.amsl.com>; Tue, 5 Jan 2021 15:53:17 -0800 (PST)
Received: from ste-pvt-msa2.bahnhof.se (ste-pvt-msa2.bahnhof.se [213.80.101.71]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CF40C3A0D45 for <ntp@ietf.org>; Tue, 5 Jan 2021 15:53:14 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id 35DB33F816; Wed, 6 Jan 2021 00:52:58 +0100 (CET)
Authentication-Results: ste-pvt-msa2.bahnhof.se; dkim=pass (2048-bit key; unprotected) header.d=rubidium.se header.i=@rubidium.se header.b=Tc3PCEa6; dkim-atps=neutral
X-Virus-Scanned: Debian amavisd-new at bahnhof.se
Authentication-Results: ste-ftg-msa2.bahnhof.se (amavisd-new); dkim=pass (2048-bit key) header.d=rubidium.se
Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hRldfpKg5obs; Wed, 6 Jan 2021 00:52:56 +0100 (CET)
Received: by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id B09F13F7F5; Wed, 6 Jan 2021 00:52:56 +0100 (CET)
Received: from machine.local (unknown [192.168.0.15]) by magda-gw (Postfix) with ESMTPSA id 454329A0294; Wed, 6 Jan 2021 00:53:10 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rubidium.se; s=rubidium; t=1609890790; bh=FDCokNn+a8Vea2bnw6a3HF55lDPR9aiQX15eQOlFCs8=; h=Cc:Subject:To:References:From:Date:In-Reply-To:From; b=Tc3PCEa6oEslzzispUBc0zP8gGuE702Iy7r9kW/FK6wA86e40dK29atAImjgRPCBC cNlwBsoos+UfpkbF3duieNuM90q7/sVM21vP4ERqQDWxUkrzWGQ2vgyPlMghojCSym aBlfE7O5m1fDXdRQo35xYmnoMnYhs1LXSyrJg/00PEpSJHmoUD0WyqKtBD6lnizKuf iYvaOAyONKV0PEnCrcab9b12K+IGAjT6RfpqcsaSigdhaGV/bkwzUSr3rH72sGi92S g8GNtBY+sxKi5UNARJflk79zK1zXSBtystaSjAbd7PB9Kok+t3sIS4i7hwaPy+mi3Y q4bk+XcL/U9OA==
Cc: magnus@rubidium.se, ntp@ietf.org
To: Miroslav Lichvar <mlichvar@redhat.com>
References: <20210102081603.1F63C40605C@ip-64-139-1-69.sjc.megapath.net> <cecaf661-92af-8b35-4c53-2f025c928144@rubidium.se> <20210104164449.GE2992437@localhost> <b1e61f7d-6cea-5e99-69f0-7eae815d9e19@rubidium.se> <20210105083328.GA3008666@localhost> <ba5d2cde-6b5e-d9b6-1877-c4060bf43e80@rubidium.se> <20210105144225.GH3008666@localhost> <35c4be55-b6af-82b5-aacd-d5a591383dec@rubidium.se> <20210105162901.GJ3008666@localhost>
From: Magnus Danielson <magnus@rubidium.se>
Message-ID: <54387a31-5c6e-7e61-dc2b-270c86ccbb07@rubidium.se>
Date: Wed, 06 Jan 2021 00:53:06 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <20210105162901.GJ3008666@localhost>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/-NbuNdafuPyVpAmhhmOCrxtT9RQ>
Subject: Re: [Ntp] CLOCK_TAI (was NTPv5: big picture)
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <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: Tue, 05 Jan 2021 23:53:20 -0000

Miroslav,

On 2021-01-05 17:29, Miroslav Lichvar wrote:
> On Tue, Jan 05, 2021 at 04:51:13PM +0100, Magnus Danielson wrote:
>> Actually, here lies a problem. There seems to be fairly wide agreement
>> that we want the core time-stamping to use a TAI-like form of time. This
>> means, it keeps ticking, behaves like a well-functioned linear ramp.
>> That makes any processing of it easy and so does all encoding.
> Yeah, I don't agree with this idea. It will create more problems than
> solve. I'd like NTP to be versatile and support multiple timescales,
> as PTP does for instance.

I'm not at all convinced. PTP has little, at least as I can see in
IEEE1588-2008, that really supports the UTC with time-stamps. I should
check IEEE1588-2019 for more details, but you will have to explain very
clearly how that support comes about in PTP, because as I see it, if you
run UTC only it's hand-wavey at best. If you can show clearly how PTP
handles UTC and especially as a leap-second occur without hickup.

>
>> So, when forces say they really, really want to get rid of these
>> encoding issues in the core transport of time-stamps, it's a real thing.
>> It will be completely incompatible with UTC transport without means to
>> handle things.
> You cannot get rid of these issues until operating systems fully
> support a non-leaping timescale and the TAI-UTC offset is always
> known. I don't expect that happen anytime soon. You can specify a
> nice protocol that supports only a non-leaping representation of time,
> but it will just make implementations more complicated and less
> reliable on those systems if the protocol actually gets implemented.
Well, I think it can be done.
>
>> Now, if the source side is unable to derive the TAI-UTC difference from
>> it's timing source (say a simple GPS-receiver), when to resolve this,
>> some other means of resolvement needs to be done at the server. You
>> could use a leap-second.list file. You could use DNS based methods. You
>> could listen to other trusted NTP servers only to attain the TAI-UTC
>> difference and then re-distribute that. Regardless of which, when
>> achieved you can provide the full service for all clients.
> That's not always practical. If you start to rely on humans doing
> something once every few years, you can be sure it will be broken. We
> have few CDMA-based NTP servers in our network. They need to be
> manually programmed for each leap second. You can guess how many times
> I have seen that done correctly. Not once. It's fixed only when people
> notice their clocks are off by one second. Before another leap second
> occurs, it's all forgotten.

Yeah, so I did suggest several ways to remedy that.

As a secondary note, do take a look at the expected lifetime of the CDMA
service, as that may be phased out as 5G roll-outs starts to come
closer. A lot of them have already closed.

>
>> If we say that we indeed can have different time-scales, then each user
>> then needs to be able to handle the situation of conflicting time-scales
>> from different servers, either separate or at the same time. I end
>> thinking madness lies within.
> I don't expect it to be a problem, at least not a bigger problem than
> trying to convert everything to a common timescale. In the case when
> the server cannot provide the service in the requested timescale and
> the client cannot convert the timestamps locally, how could it
> work if the protocol allowed only one timescale?
I never said it could not be done, I said it would be complex and
troublesome. Avoiding comlexity seems to be one of the driving forces
behind NTPv5. If so, one will have to choose what things remains and
what one trade out. I am very sure that people is not fully coherent on
that and what it endtails, therefore one needs to ask the hard questions
so people learn what challenges lies ahead. If we are not agreeing on
basic properties, the discussions further down the line will not be very
fruitful.
>
>> I lean towards pushing the conversion requirement onto the NTP source
>> nodes just to achieve the intended cleanness of the rest of the
>> infrastructure.
> It makes sense to require servers to convert the timestamps if they
> have the offset, but for some hardware implementations (one-step
> clocks) that might not be possible.
>
What one-step clocks would that be? Surely, I expect none of the
existing NTP clocks to automatically support NTPv5, almost regardless
which shape it will take.

Cheers,
Magnus