Re: [Ntp] Antwort: Re: The bump, or why NTP v5 must specify impulse response

Doug Arnold <doug.arnold@meinberg-usa.com> Fri, 17 April 2020 15:01 UTC

Return-Path: <doug.arnold@meinberg-usa.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 268D33A0C9E for <ntp@ietfa.amsl.com>; Fri, 17 Apr 2020 08:01:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.233
X-Spam-Level:
X-Spam-Status: No, score=-1.233 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=meinbergfunkuhren.onmicrosoft.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 L2-XaKH3gtLu for <ntp@ietfa.amsl.com>; Fri, 17 Apr 2020 08:01:36 -0700 (PDT)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60079.outbound.protection.outlook.com [40.107.6.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D20F33A0C96 for <ntp@ietf.org>; Fri, 17 Apr 2020 08:01:25 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kl1gI1zZTTEUAaJnZWGVzzbfELBI3Rvu9cJQq2XzradQLH9LvL2NQazyIkhE2E3qjjJwq4FKtVIaqQtxMHwmLWM8/tZwacLXHDgSDDoPd8qFTxC+RmFsYNidu/MoRP151u2r8MgglukGjMtTX/1MkOZkdvBHekp2vVMQHqkOckR4Kx4d6dayXQoPGeaJ6swZwBhL8eqk20DIPua+HVV4AaBBQv/oO7K0kHvI2LwDnBCPP1NHXsZ6F5pGT39WePv7jH1NLq9IAaYP2tiGRii2zYMvDsDJ0w2bIJf8nHjnL+CbmZCYQlt6/dTr8Nb/0Fa+Z4/GuxD9KrwoxU9Vq67M4g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WNTVQIbx6rGVEvGXMTTifIXd1YKK18CWcMPKDULoqPE=; b=aBvAKqq9PokgshrlqoKV+R4N8fkUv55Ldp0CswndF03xUcWHzYH6y75TUJXRSyQPvdeQpOGUl1YF5AqTaM3x1gRthVMtAYBsvB2cY0bYip4G5HA0xx6OdLjnRDDRkLp+gpw8DRmskcQJqnbWBg5YPJ5IQa1CCgkOOP5bF6wfrGhWyZCJ1pudQvEIWovQPzaGrnS72T2A8y8Ck0OdkQKbsOaZao3YHmWf153p+fKDkjYAXfFrhfakrr8mHLttsNPABuYcLaXC/cZnWfJUMerZmeqwu5RbIPn/XH8vf1f9J/VHFpgugAXic9auWl+JDSRIhLU0HEX9eJw1mwl5KyKHug==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=meinberg-usa.com; dmarc=pass action=none header.from=meinberg-usa.com; dkim=pass header.d=meinberg-usa.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meinbergfunkuhren.onmicrosoft.com; s=selector1-meinbergfunkuhren-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WNTVQIbx6rGVEvGXMTTifIXd1YKK18CWcMPKDULoqPE=; b=CRi8qHORhMl+JSd5HPKvVHxvynyC9SPgtZvNRAiyE8aQxZzH7LADCnSlMZn87VZwmK3qmhGna0rLcNHIoWLLl1Gvw9iExz1CBALw4YLyj5PASrRyGSOMhsuwblnzZ/6Pn5Ske6nlkVNQLR0tdmsZ1xedvZEE0LjkoME2rGuoAc0=
Received: from DB8PR02MB5611.eurprd02.prod.outlook.com (2603:10a6:10:eb::31) by DB8PR02MB5884.eurprd02.prod.outlook.com (2603:10a6:10:118::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27; Fri, 17 Apr 2020 15:01:22 +0000
Received: from DB8PR02MB5611.eurprd02.prod.outlook.com ([fe80::9525:30ab:defe:44a6]) by DB8PR02MB5611.eurprd02.prod.outlook.com ([fe80::9525:30ab:defe:44a6%7]) with mapi id 15.20.2900.030; Fri, 17 Apr 2020 15:01:22 +0000
From: Doug Arnold <doug.arnold@meinberg-usa.com>
To: Daniel Franke <dfoxfranke@gmail.com>, "kristof.teichel@ptb.de" <kristof.teichel@ptb.de>
CC: NTP WG <ntp@ietf.org>
Thread-Topic: [Ntp] Antwort: Re: The bump, or why NTP v5 must specify impulse response
Thread-Index: AQHWFMfnOk0D5i5wvEmKr5t17GQ2fqh9ZxYY
Date: Fri, 17 Apr 2020 15:01:22 +0000
Message-ID: <DB8PR02MB5611BA672E5E911FB100F1EACFD90@DB8PR02MB5611.eurprd02.prod.outlook.com>
References: <CACsn0c=zzDKP6iBjPJWGF0rkqSaY3AY738ynGwDZO14sdBJ-Bg@mail.gmail.com> <CAJm83bB2A3VUxXX47Y0ubmS9Xne7PRSyV_xHY_D9YvHjqE-vFA@mail.gmail.com> <CACsn0cm3jpKZTUQ=novTgVaFhc1xCJgmUF3oOgdrzQa-HgOCUQ@mail.gmail.com> <CAJm83bAqbMMs2W3SyH+3c17wcC85paY4-_jk2SxczgsxBLyYyA@mail.gmail.com> <CAJm83bAQeR_6U3jgmbWzdus3pu+OO2_KP+M9RtbCFYOfDQy4dw@mail.gmail.com> <DB8PR02MB56111CCA23CDCF97A3C9F3E8CFDD0@DB8PR02MB5611.eurprd02.prod.outlook.com> <F7E5836A-4C7A-4A1A-B769-65EADE2C8F5C@gmail.com> <7d909ae3-a830-1270-6920-fa088a56525e@nwtime.org> <6C9832A9-E18B-4DE2-934F-9E471FC22F7B@akamai.com> <bc7920e2-dc81-ba7f-ec24-7926cda8589d@nwtime.org> <E591F38A-A303-4077-BC4C-A61AB7867F83@gmail.com> <OFF6FE7A91.279129DD-ONC125854D.00379455-C125854D.0038D979@ptb.de>, <CAJm83bAUqCyy6iKVkGNyHN9hoaEbchuR4bx+kmc=Z-iOrZ3Bgg@mail.gmail.com>
In-Reply-To: <CAJm83bAUqCyy6iKVkGNyHN9hoaEbchuR4bx+kmc=Z-iOrZ3Bgg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=doug.arnold@meinberg-usa.com;
x-originating-ip: [64.30.82.72]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 69310705-e946-447a-b72c-08d7e2e03177
x-ms-traffictypediagnostic: DB8PR02MB5884:
x-microsoft-antispam-prvs: <DB8PR02MB58848454F0F5C019DA15D073CFD90@DB8PR02MB5884.eurprd02.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-forefront-prvs: 0376ECF4DD
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR02MB5611.eurprd02.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(376002)(346002)(136003)(366004)(396003)(39830400003)(19627405001)(52536014)(33656002)(966005)(81156014)(8676002)(8936002)(508600001)(316002)(9686003)(110136005)(4326008)(71200400001)(186003)(55016002)(91956017)(2906002)(76116006)(66946007)(66446008)(64756008)(66556008)(66476007)(26005)(44832011)(86362001)(5660300002)(53546011)(6506007)(7696005); DIR:OUT; SFP:1101;
received-spf: None (protection.outlook.com: meinberg-usa.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: yP5uznSz+fvMWWO8dgzmAkSdIEyL9X2NI9QS8RXnBQMGxlIgbr6Bb71HgyAYcphqQKQEAmp6JiX5OEC4DMoqevpe1epMR3JBc0MVMA0L4euz7Tf6IUFvbkLCIXEpWf1FBVbtel17KT42g6uDUlOv5ML2/CmSm4ZxtyqPMj1KJJ7WDNdAGfNu7iKJjS7Cgv3t/1o6Sp9QadO47QDRCob4xI2EIFPVX1G0sFVRIvpBUDdOjgRyVv/AdtzWsXU2+Wf0NVWRHISORr/JxmUoBbCAqqs5M8Fjd2yD9cXGY/HHiaVUQpFuaa+GayPPPlGWFisLkXqOFJZUPopVaKJ8HDLLq5WCiFoEnjjYcgwrgH2KqyJle3HDVx4+nyaxFZ7hlKGcp0x/C4q68txSC83/+c7+Ea1CVXnwMC/6Sma7IRn++8DCeIpthCaU61ModLFg2P/SQnpOiCuIIEszih4lCTYBNrbt09m3Mu5eXUopeR/OnS1qXBpki97F+pKjVS2am8RTW4q7F1NWN7IEu4RxVSFyHw==
x-ms-exchange-antispam-messagedata: +GVXFOQE9+/NBhKiWnmPBgI6DEzHSWqkRARkwStBuoZWq9rpZLO5M4qtscZyYGqaqbgpB1mIsvlH/d1os8zIsnGgN8ibiJ2qWlTFhsw+NraOoHEfblGihdda6BHEupAwT+9nOckIEYIxTjXqObj3CQ==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_DB8PR02MB5611BA672E5E911FB100F1EACFD90DB8PR02MB5611eurp_"
MIME-Version: 1.0
X-OriginatorOrg: meinberg-usa.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 69310705-e946-447a-b72c-08d7e2e03177
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2020 15:01:22.5356 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: d59904cd-769f-4368-8bd0-f5f435893a38
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Mc1+dBC+xuGkvoShL1VokLQd19YxcqZWEgrkB2UHTiGoyW6Gk0LkYYNlZlyWTtETum4b2zm+l171cS3a336FAyLov8UoScR8AnGzhyVveqw=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR02MB5884
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/4gJ1-fkKixt6DT7Rj2AbDwNTUSk>
Subject: Re: [Ntp] Antwort: Re: The bump, or why NTP v5 must specify impulse response
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: Fri, 17 Apr 2020 15:01:39 -0000

Good point on the NTP/OS interface.  Perhaps in the architecture we will define what NTP needs from and whats to set in the OS, like the idealized OS interface you alluded to.  Then each specific OS will need some kind of adapter shim layer.  That could make NTPv5 easy to port to a new OS.  You only need the OS adaptor layer.

Doug
________________________________
From: ntp <ntp-bounces@ietf.org> on behalf of Daniel Franke <dfoxfranke@gmail.com>
Sent: Friday, April 17, 2020 7:52 AM
To: kristof.teichel@ptb.de <kristof.teichel@ptb.de>
Cc: NTP WG <ntp@ietf.org>
Subject: Re: [Ntp] Antwort: Re: The bump, or why NTP v5 must specify impulse response

On Fri, Apr 17, 2020 at 6:21 AM <kristof.teichel@ptb.de> wrote:
>
> Hey all,
>
> I wanted to offer my point of view on the question of modularity for NTPv5 as discussed here.
> As many of you may know, the place that I'm coming from is not decades of practical experience in NTP implementation and/or maintenance, but instead years of close academic and theoretic scrutiny concerning guarantees for time synchronization methods.
>
> For me personally, the separation of NTP would ideally not only be made into protocol on the one hand and algorithmic and response behavior on the other hand, but go one step further.
> I would prefer separation into three layers, specifically:
>
> 1) Network protocol (what kinds of messages can one send, and how does one have to respond to incoming messages); this should be specified on a per-association basis and security should be handled mostly here.
> 2) Algorithmic offset calculations to the desired "true" time scale (how does one calculate time offset, frequency offset, perhaps offset of higher-order derivatives); this can involve multiple associations; security of the individual associations should be known so it can be taken into account if desired; this is the module that needs to be aware of the use of different time scales such as TAI vs. UTC, the handling of leap seconds etc.; this module should also be aware of how clock steering is handled (see below) and account for it.
> 3) Clock steering (how is the participant's clock manipulated in order to accomodate the measured offset(s) and make the clock read something close to the "true" time, e.g. hard-setting the counter vs. manipulating the frequency via counter increment vs. manipulating the clock in other ways such as via the oscillator's voltage vs. handling all of that via virtual clocks); this can differ between machines, specifically between OS and hardware and should be treated appropriately.
>
> With this separation, we need well-defined interfaces between 1) and 2) and between 2) and 3).
> Not dealing with 3) in a specification and leaving it to implementations should be seen as a real option, keeping in mind that knowledge of 3) can increase accuracy of 2).
>
> Regarding the nomenclature, I would strongly suggest getting consensus first on which of the many ways forward is going to be taken in order to arrive at something that can be called "NTPv5".
> Specifically, it should be decided early which of 1), 2) and 3) that document should treat, the options as I see them being 1) only, or 1) and 2), or all three.
>
> What do you all think?

My ontology is similar, but quite identical, to Kristof's:

I. The syntax and semantics of the wire protocol
IIa. The algorithm for estimating the offset between your clock and
that of your peers
IIb. The algorithm for combining estimates collected from multiple
peers into one "consensus" estimate
IIIa. How to use that estimate to steer the clock used for capturing
the timestamps used in the wire protocol
IIIb. How to use that estimate to steer the clock that other
applications see when they ask for the system time

The central question of this thread so far, up until Kristof entered,
could be expressed as "How much is (IIIa), and by extension (IIa) and
(IIb), really a part of (I)? When we say that the timestamps on the
wire confer an estimate of the current time, how particular do we need
to be about the properties of that estimate?".

NTPv4 and prior don't distinguish at all between (IIIa) and (IIIb),
but NTPv5 might have to. My sketch allows discontinuous adjustments to
the `tai_loc_offset` field with each new data point obtained. But a
lot of applications depend on having a single system clock that's all
at once monotonic, reasonably accurate, and reasonably
frequency-stable, which means there has to be some further smoothing
step involved (perhaps a PLL, perhaps something else).

In an ideal world, the contract between the OS and the NTP daemon
would be the same on all platforms, and would be something like this:
the OS provides the NTP daemon with a monotonic time counter driven by
the hardware oscillator, and the NTP daemon provides the OS with a
running estimate (maybe with error bars included) of the first few
Taylor series coefficients of the function from that counter to TAI.
What the OS does with this information and in particular how it
communicates it to other applications on the system is none of the NTP
daemon's concern.

Unfortunately, currently *no* OS provides us with anything this clean,
and even if one did we'd still have to accommodate all the ones that
don't if we want our spec to be platform-agnostic. Since we don't
control the OS landscape and it changes on a different and faster
schedule than NTP spec does, there's only so much we can do here. We
can specify what we wish the interface would look like and maybe some
kernel hackers will feel inspired by it, but for the foreseeable
future NTP implementers are going to have to contend with
less-than-ideal interfaces, and the most the IETF can do for them is
give some abstract general guidance on that.

_______________________________________________
ntp mailing list
ntp@ietf.org
https://www.ietf.org/mailman/listinfo/ntp