Re: [Ntp] Antw: [EXT] Re: Timescales

Warner Losh <imp@bsdimp.com> Wed, 09 December 2020 19:49 UTC

Return-Path: <wlosh@bsdimp.com>
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 EE8333A10D9 for <ntp@ietfa.amsl.com>; Wed, 9 Dec 2020 11:49:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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=bsdimp-com.20150623.gappssmtp.com
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 T8L0rbT5tQjY for <ntp@ietfa.amsl.com>; Wed, 9 Dec 2020 11:49:44 -0800 (PST)
Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 557483A10D8 for <ntp@ietf.org>; Wed, 9 Dec 2020 11:49:44 -0800 (PST)
Received: by mail-qt1-x833.google.com with SMTP id z20so1878047qtq.3 for <ntp@ietf.org>; Wed, 09 Dec 2020 11:49:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c28J7sybei+iDEFvgMaNiE59Ol18yKAp0exZ1ALbVhs=; b=ctQjwJmKK6BifxOoI0b942PO0LcyJrDU+6PS6QHwqwClKlUtYEK6F/DG4CWn4Z/HNk dWNdVrTYVa6NIppxLbPA+sn8Kcfymo1NBqpUek+NYR7zBQbxEBPWzNuygMfLIvSn3dci FDyCQi42XzHgCebVi6QR/LtPoYT2apa3trJ+gkRHATVqW77IqoaEIpU2vsoZTXW+zXcm PJSqsWSM5JFHXGyU261mklSF9VxtINoKad78bBg4bsE7v/YndCuDVrIp9jiUctV23sH9 LtupvrKpSjzkEZDrWZRKNfu5HKNxhK1X+cqva7filsDbw6V6XDFNCcfEmtRMxM5laDMi ZmiQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c28J7sybei+iDEFvgMaNiE59Ol18yKAp0exZ1ALbVhs=; b=MbIeri5cSUORwVThwC3ZzVff0+WKZF6+BLT5aQHJDFaJARpBCqyK7bOUKacuRoQ1WG CGn2AvMErspaD5+N/3PCDEQt4BOZq4ePTOcKDC2Dk9AVyo5XjVvXRB06qH3PHCsd4BrU NSbCXJLsXpACwYLS4TBvjbeVk2DZ3PBpIDRWoC9TnifNURLWVaJe5ap8g+lDnfZQXI3r OS53rQp2uFGF940LIcBn1jzBMmJQl2gC/n2eEoBhbuqLiw/hW4v57DV3NBXyPMzZM6Zw WrHZxIRUVQ+KIActNwrecMEfpGMH8KWpc3bS4AKAtcq5M9gRrFfooJJ+km9oVMzD3o4P Fjlw==
X-Gm-Message-State: AOAM530epW9EanhD8EiAwM0wpp3Evpe/VGFhR5RxzHQmpiQGrPY0FNuo 0NndIaz/wMoPIND3K+X19KDx7jdciVENCNo2xHvGAA==
X-Google-Smtp-Source: ABdhPJzOCCrjkUJWSZ1yTz+7T6Q8yNVHFQOWbMRpQ6fcXbRdlZHjjNcc1LOSXeyeMyHN0APOonFXp1DjwrL5J6zx9f0=
X-Received: by 2002:ac8:4910:: with SMTP id e16mr4886692qtq.244.1607543382838; Wed, 09 Dec 2020 11:49:42 -0800 (PST)
MIME-Version: 1.0
References: <20201209101830.7CB0240605C@ip-64-139-1-69.sjc.megapath.net> <20201209113003.GA2352378@localhost> <5FD0D13C020000A10003D6CB@gwsmtp.uni-regensburg.de> <20201209134612.GC2352378@localhost> <f85591b1-5d4f-d468-1011-bbeb276ebdec@thalesgroup.com> <20201209142205.GD2352378@localhost> <0d54883b-8cd7-cd61-0b44-145548a3e44d@rubidium.se>
In-Reply-To: <0d54883b-8cd7-cd61-0b44-145548a3e44d@rubidium.se>
From: Warner Losh <imp@bsdimp.com>
Date: Wed, 09 Dec 2020 12:49:31 -0700
Message-ID: <CANCZdfoBv_DiK2HnroDbkTbsUEXM=CtoeyPuuC9PjeTLzn491A@mail.gmail.com>
To: Magnus Danielson <magnus@rubidium.se>
Cc: NTP WG <ntp@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000004bbe2705b60d5ccd"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/5fvRLHeP6-3trQ3LvrQ1tIx_CeA>
Subject: Re: [Ntp] Antw: [EXT] Re: Timescales
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: Wed, 09 Dec 2020 19:49:49 -0000

On Wed, Dec 9, 2020 at 8:11 AM Magnus Danielson <magnus@rubidium.se> wrote:

> Miroslav,
>
> On 2020-12-09 15:22, Miroslav Lichvar wrote:
> > On Wed, Dec 09, 2020 at 02:07:28PM +0000, FUSTE Emmanuel wrote:
> >> Le 09/12/2020 à 14:46, Miroslav Lichvar a écrit :
> >>> NTP could distribute a leap-second table (it already did it with
> >>> Autokey, right?), but isn't NTP about distributing current time,
> >>> rather than reconstructing time in the past or future?
> >>>
> >> "Current" is a referential problem. As soon as you distribute/tackle
> >> different time scale which one is "current" ?
> >> You will more or less  inevitably start to need to reconstruct time in
> >> the past or future.
> > In all timescales there should be a value corresponding to current
> > time. It may be ambiguous.
> >
> > For the purposes of clock synchronization I think the client just
> > needs to know the current time and whether there will be a leap second
> > in the next slot if the timescale jumps on the leap second. If NTP
> > should also allow the client to know current time in another
> > timescale, it also needs to know the current offset (e.g. relative to
> > the receive timestamp) between those two timescales. The NTPv5 draft
> > does that.
> >
> > Most computers work primarily in UTC. The leap second tables are not
> > universally available. NTP needs to keep the UTC support and work even
> > when the TAI-UTC offset is unknown.
> >
> While I in general agree with you, a few words.
>
> First of all, we never get the "real" UTC, but only a local replica
> attempting to follow and respect some other time-scale, may it be UTC or
> TAI or whatever. Depending on how well we do the job in the chain from
> the source to the client, this replica may be more or less well aligned
> to the time-scale it attempts to replicate.
>
> It turns out that we have an increasing need to create TAI or PTP local
> replicas in addition to UTC replicas, and yes this is implied even with
> NTP as timing protocol. In the media industry we move all of our
> processing over to that, while we do more and more on "normal" clients.
> In fact, many other processing things occurs on essentially Linux
> platform for a whole range of processing needs. So, the need to know the
> TAI-UTC leap-second offset in addition to current time is needed.
>
> In my mind, the train to discuss the need for leap-second information
> has already gone. Too many applications start to need it for them to
> function well, and if NTPv5 is not able to deliver that, then it should
> either be redesigned to just dropped as an effort and focus on a
> revision of NTP that does support it, because what is needed is a
> solution that supports this. In the meanwhile, PTP has the needed
> support and we could just drop NTP and go all PTP then. Personally I
> think there is great value in NTP for many applications, if only it can
> handle this properly along getting secure with NTS.
>

One of the biggest issues I had with getting leap seconds to work right is
distribution. NTP v4 punting leapseconds to some crazy autokey ghetto
didn't help. Leap seconds are always some bastard stepchild in the timing
community. Yet they are also critical for UTC to be implemented correctly.
You can't purport to be a UTC time scale w/o distributing at least some
portion of the leap second table. If NTP can't make leap seconds first
class citizens that are mandatory for all implementations to  implement,
then they will continue to be bastard step children.

Most reference clocks will provide this information at stratum 1. Some will
not and we should shift the burden of those clocks to require
administrative support. They are rare and the main protocol shouldn't be
designed to cater to recovery of phase and frequency without meaningful
recovery of the meta-data that UTC needs to be implemented correctly...

Warner