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

Doug Arnold <doug.arnold@meinberg-usa.com> Mon, 13 April 2020 21:22 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 23B8D3A1E6E for <ntp@ietfa.amsl.com>; Mon, 13 Apr 2020 14:22:44 -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 SlfPZAdmjSiC for <ntp@ietfa.amsl.com>; Mon, 13 Apr 2020 14:22:41 -0700 (PDT)
Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30042.outbound.protection.outlook.com [40.107.3.42]) (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 E39F33A1E6C for <ntp@ietf.org>; Mon, 13 Apr 2020 14:22:35 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NNWIZnrMWS3p2weYtwsbRX4YgCn9ekq81ICkbKIe/mXmre58lCQOeFnzxWgqPP0HvyW8pTZj8CFlyzvFqVF4y23qflLTKNaMxNzefJR2QgygsPe0dos9UAI+JQdJzmPZ27XGE+kxMioWy4qL3AppSbvHPdD8RfEzikFGR+nGPPoK1tbGPeZgELQWMpaWnumoFbL52GJbGqssRpN5tPN5TGIXrLpxBeGVBrSN7Y0AoujPBJWEsPLn3xJvs67ETkQBML7IA3bEZ0tzC4K6nva2SVbMH82W8hSBchu5mMsU9n/PzW5//Ra36mSuRKK4AMtaQkG4SKcviofvHhIcalUxVw==
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=L/pZlSRu02EIrPT/iXqNRPBUaKJ05CTu58su/wOCC0I=; b=XGmdT5KOoXj8HsmQdNsVRrtbYN0zQsOxrNn+HbObM69SSrD+qGgaLG1I6hOD20pFzIAG07RUEibhliYW6VpRVP3xQWA26iiBTqjeV2pZQ9qD3Ljr/rxBLMq+D82Ln/ET6/mYd5poZN9FGVF84mboAbmL7JSOENsDOz01DVvvB1zL1tJM8cb4levldRSgSXjsRu57qOA2F8G+vlDJ2Ll36einvrsEghE1jQZ7NJo5/qT67k5R01AVsP7i8lJPLaMg2DYYcXYcyPIfQINhhBGu420PQW9wBFMxQaxQG0vSifK72Lp+/1D34DVziea0Bg4Qd4jz5HYDSfwFCDQ9N5I05w==
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=L/pZlSRu02EIrPT/iXqNRPBUaKJ05CTu58su/wOCC0I=; b=h9UDFPNkmmRQHjt3BsnQgbDLBgiL0RxbPofr60ypfAOxy74NZP/xQT8LI0D2lnDBMyRP2gue6cXnhqz7eLs7cXe2og4oK+nJlEkQBoS3DptLGVGYi4N/RmAb36q0p8L3jHGrPmW9i6IlCVEjfL7Vjpq5nYtKVG4DCv/FFYnhqZM=
Received: from DB8PR02MB5611.eurprd02.prod.outlook.com (2603:10a6:10:eb::31) by DB8PR02MB5385.eurprd02.prod.outlook.com (2603:10a6:10:38::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Mon, 13 Apr 2020 21:22:33 +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.028; Mon, 13 Apr 2020 21:22:33 +0000
From: Doug Arnold <doug.arnold@meinberg-usa.com>
To: Daniel Franke <dfoxfranke@gmail.com>, Watson Ladd <watsonbladd@gmail.com>
CC: NTP WG <ntp@ietf.org>
Thread-Topic: [Ntp] The bump, or why NTP v5 must specify impulse response
Thread-Index: AQHWERdg/8i/rvFkyUOx/r80OrpRSqh3G4MAgABSFYCAAAKRAIAADJ2AgAAM+D8=
Date: Mon, 13 Apr 2020 21:22:33 +0000
Message-ID: <DB8PR02MB56111CCA23CDCF97A3C9F3E8CFDD0@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>
In-Reply-To: <CAJm83bAQeR_6U3jgmbWzdus3pu+OO2_KP+M9RtbCFYOfDQy4dw@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: 9ecc5f0f-c021-4603-602f-08d7dff0c7a8
x-ms-traffictypediagnostic: DB8PR02MB5385:
x-microsoft-antispam-prvs: <DB8PR02MB5385E0BDC129AA0946DAE806CFDD0@DB8PR02MB5385.eurprd02.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 037291602B
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)(39830400003)(346002)(396003)(376002)(136003)(366004)(19627405001)(508600001)(2906002)(71200400001)(44832011)(6506007)(53546011)(186003)(966005)(26005)(33656002)(86362001)(110136005)(91956017)(9686003)(8936002)(55016002)(7696005)(4326008)(8676002)(76116006)(81156014)(66476007)(316002)(64756008)(66446008)(5660300002)(52536014)(66556008)(66946007); 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: 8OasujKLmPl8UiRTAUg1mEXj5CFP1Tu/zexUrJjfzMXFryB8If+nb7loaLnTJndfJ3mPdgYg+/MiMwJWLfe4IAFJHXqK9JZVsFwCzwDtD8EN56CAYEyAlNqzohQmKSYgb2KNc0gB7Pma6qNZYLfqY/g08MOB/89tehMKgkoQ1eMbEJ2bCqtyQ+ovX9WBXq8WjUc0wQIUzjCbhT1GqLmDxxFzwDfkJWtCgxfFSUVbU/cCs7iiQj6bVtEMaRf+9AaBUI6q10VqSCjFZB0ZnsW5oWNLk+pR7OlCmvQfFkalwSAQPY/doJ2PIop13mws0KJ8p8Zg+ffTum8jNcr4qqRvZlLCNXBVeMtAqQNm6tZcLPrzv54aSfI15mb2R6zCxUpws/ek80IB5xCUEXwhR5JT3SMRAlBIBspw8MzF3nYrvXnJ3+HGTwDOxvr8HSKQrB7ZZ9JPctgMibisIMDoOKAdX9WkyhpV1JMopzqRRJ+HLM0uGOgMWT/a4hQynoksEBLLjC+pDcvVCfDXyJiUbQFtlw==
x-ms-exchange-antispam-messagedata: yGPUHp2GM+kLYTOtlZ8fu/hnKAXnxEXDs97r/V20Ufblc/vP0fXIqAi07iPqMKc4J59Lw+sCk8klnYRZh3ndBVup6iOQY9LTRhhefGVhO25vKCP2Vb5FQLA+wTw/OB04PoT9un4jlbAM2ONL+T3VMg==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_DB8PR02MB56111CCA23CDCF97A3C9F3E8CFDD0DB8PR02MB5611eurp_"
MIME-Version: 1.0
X-OriginatorOrg: meinberg-usa.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9ecc5f0f-c021-4603-602f-08d7dff0c7a8
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2020 21:22:33.0420 (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: nb77AGRbIJViwqRbXwMRp1swHNyPoVV3/MCX+4YxlVZdLRXADyMlWuHGlUNWIwKNTa6ohzHeqCotxDNw18bxPH+yNsaJuodontkuBnUOuAM=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR02MB5385
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/vjpi3H1-vJMxtvUQJ8K0K-UE-Aw>
Subject: Re: [Ntp] 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: Mon, 13 Apr 2020 21:22:44 -0000

I think that the most important thing for the clock steering algorithm in ntpv5 is that it is modular.  Define an interface to the clock steering subsystem so that people can make servo loop filters specialized for a specific set of conditions.

If we define a default clock steering algorithm, the most important property is that it always converges, even if it is not the most accurate for any specific network conditions.  It probably has to be fairly simple to have this property.  Complex algorithms usually have weird corner cases.

As for Kalman filters, they work really well for things like GPS receives where the noise properties are relatively constant.  Then you can tune them for those noise properties.  Queuing noise in a network varies wildly, and is often exhibits a highly skewed client clock error measurement probability density with a peak near zero followed by a long tail in one direction.  I suspect that Kalman filters will perform poorly on highly skewed data unless you have a non-linear prefilter to make the noise probability density closer to gaussian.  I know of people who have gotten good results for PTP servo loops using Kalman filters, but with a generalized luckly packet prefilter to eliminate the long tail in the distribution, and with the prefilter also determining the Kalman filter parameters.  That is a complicated algorithm which probably has some catastrophic corner cases, so it wouldn't be a good candidate for a default servo loop which always works at least ok.

Doug

________________________________
From: ntp <ntp-bounces@ietf.org> on behalf of Daniel Franke <dfoxfranke@gmail.com>
Sent: Monday, April 13, 2020 1:09 PM
To: Watson Ladd <watsonbladd@gmail.com>
Cc: NTP WG <ntp@ietf.org>
Subject: Re: [Ntp] The bump, or why NTP v5 must specify impulse response

What motivates my skepticism here, by the way, is a belief that it's
possible to get much, much better performance with better
synchronization algorithms. A number of academic researchers have
experimented with Kalman filters [1][2][3] and gotten phenomenal
results, in the case of [1], two orders of magnitude better than stock
ntpd 4.2.0. I suspect that this could be even further improved with
more accurate network models (Kalman filters would be provably optimal
if network jitter were Gaussian, but we all know it isn't). I want to
avoid specifying any requirements that would discourage or obstruct
this sort of research from being developed into production
implementations.

[1] https://ieeexplore.ieee.org/abstract/document/4268082
[2] http://alumni.media.mit.edu/~aggelos/papers/tuffc_nov04.pdf
[3] https://www.sciencedirect.com/science/article/pii/S1474667015361358

On Mon, Apr 13, 2020 at 3:24 PM Daniel Franke <dfoxfranke@gmail.com> wrote:
>
> I don't think I follow. In what sense does it limit the length of the
> chain, other than that stratum is capped at 16? And what
> characteristic of RFC 5905's recommended input response address the
> problem? (I need to read the book you've referenced before I fully
> understand the problem in the first place; I've ordered it but it'll
> take some time to arrive).
>
> On Mon, Apr 13, 2020 at 3:15 PM Watson Ladd <watsonbladd@gmail.com> wrote:
> >
> >
> >
> > On Mon, Apr 13, 2020, 7:21 AM Daniel Franke <dfoxfranke@gmail.com> wrote:
> >>
> >> On Sun, Apr 12, 2020 at 6:11 PM Watson Ladd <watsonbladd@gmail.com> wrote:
> >> > Section 14.5 of Phase Lock Techniques by Floyd Gardner describes
> >> > difficult problems caused by the accumulation of errors in a chain of
> >> > PLLs under benign conditions, and section 2.2.4 describes the root
> >> > cause, namely an inevitable peak in the transfer function of a second
> >> > order filter. I don't think these are insolvable in NTP v5, but they
> >> > should give pause to the idea that we can avoid needing to specify the
> >> > the synchronization algorithm. The peaking of the PLL needs to be
> >> > controlled, or some thing more complex needs to be specified.
> >>
> >> Are the algorithms in RFC 5905 vulnerable to this? If so, I think that
> >> shoots down any implication that it's a practical necessity to solve
> >> this in the NTPv5 spec, since we've obviously been getting by okay so
> >> far.
> >
> >
> > v4 limits the length of the chain and specifies the input response to have, which solves the problem.
> >
> >>
> >> Just to be clear, though, I'm not proposing that the WG should be
> >> *silent* on synchronization algorithms in v5. Just that whatever we
> >> have to say about it should be in a separate, Informational document,
> >> and can discuss the design space and suggest multiple possibilities
> >> rather than require one particular thing.

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