Re: [Ntp] Smearing
Tony Finch <dot@dotat.at> Wed, 20 October 2021 19:39 UTC
Return-Path: <fanf2@hermes.cam.ac.uk>
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 29AA13A0CAC for <ntp@ietfa.amsl.com>; Wed, 20 Oct 2021 12:39:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 EzS4GhMgY3Ss for <ntp@ietfa.amsl.com>; Wed, 20 Oct 2021 12:39:33 -0700 (PDT)
Received: from ppsw-30.csi.cam.ac.uk (ppsw-30.csi.cam.ac.uk [131.111.8.130]) (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 04D5B3A0DE5 for <ntp@ietf.org>; Wed, 20 Oct 2021 12:39:32 -0700 (PDT)
X-Cam-AntiVirus: no malware found
X-Cam-ScannerInfo: https://help.uis.cam.ac.uk/email-scanner-virus
Received: from [87.74.217.245] (port=62327 helo=milebook.lan) by ppsw-30.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:25) with esmtpsa (PLAIN:fanf2) (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1mdHQq-000nQa-dc (Exim 4.95) (return-path <fanf2@hermes.cam.ac.uk>); Wed, 20 Oct 2021 20:39:24 +0100
Date: Wed, 20 Oct 2021 20:39:23 +0100
From: Tony Finch <dot@dotat.at>
To: Miroslav Lichvar <mlichvar@redhat.com>
cc: NTP WG <ntp@ietf.org>, Hal Murray <halmurray+ietf@sonic.net>, Danny Mayer <mayer@pdmconsulting.net>
In-Reply-To: <YW/EXb1paK+H/f4M@localhost>
Message-ID: <7b4472a2-f932-178a-7550-164fc620808b@dotat.at>
References: <20211015210250.6330328C0F3@107-137-68-211.lightspeed.sntcca.sbcglobal.net> <2ee63d83-cde0-4665-52e1-5fa0d18325e@dotat.at> <4cfe73c5-baee-db8e-549f-2088067dcaf6@pdmconsulting.net> <fde5025-40d3-523c-a3c8-65605944cd0@dotat.at> <YW/EXb1paK+H/f4M@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Sender: Tony Finch <fanf2@hermes.cam.ac.uk>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/F3cei-z6EeEUf3cooEljD6TsJX0>
Subject: Re: [Ntp] Smearing
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 20 Oct 2021 19:39:37 -0000
Miroslav Lichvar <mlichvar@redhat.com> wrote: > On Tue, Oct 19, 2021 at 05:15:16PM +0100, Tony Finch wrote: > > * 24h smear, not too long but long enough that NTP clients will notice > > the rate change even with a 1024 second polling interval, and the rate > > change is small enough that NTP clients are willing and able to follow it > > If there are stricter requirement on maximum offset between different > clients, a longer interval might be needed. I don't think anyone has implemented a longer smear? > > * smear from midday to midday around the leap second, to keep the phase > > error below 0.5 seconds > > A disadvantage of this approach is that it relies on the leap second > to be known at least 12h before the leap. With some reference clocks > it's known only much closer to the leap and it takes time to be > distributed by NTP for a stratum >=2 server. The history of bugs in this area suggests that an NTP implementation should not blindly trust a reference clock to indicate a leap second correctly. The NTP server should have a copy of the leap second table, e.g. from the tz database, perhaps cross-checked from multiple places, so it knows months in advance when a leap second is due. Then it can use any smear profile, and verify whether the leap is being handled correctly by each of its time sources. And higher-stratum servers can and should do the same. > > * use a linear smear, because NTP clients are better at following > > constant rates (a cosine or other smoothing means the rate changes > > continuously during the smear, which NTP does not handle so well) > > A linear smear is easy to work with for humans, but not for NTP. A > cosine smear, or even better a quadratic smear, reduces the maximum > time error of the client's clock as it can more closely follow the > frequency offset. Ah, I thought Google had said their experience was the other way round, but I remembered wrong. Their web page doesn't explain why they switched from cosine to linear. (Maybe they wanted the kernel to be able to unsmear?) https://developers.google.com/time/smear) Meinberg has a nice comparison at the link below, though it's missing a comparison for clients with variable polling intervals and a 24 hour smear. https://kb.meinbergglobal.com/kb/time_sync/ntp/leap_second_smearing/ntp_leap_smearing_test_results Tony. -- f.anthony.n.finch <dot@dotat.at> https://dotat.at/ Tyne, Dogger, Fisher: West or southwest 4 to 6 veering northwest 6 to gale 8, increasing severe gale 9 at times. In Fisher moderate or rough, becoming very rough or high later, elsewhere slight or moderate becoming rough or very rough. Rain or squally thundery showers. Moderate or good, occasionally poor.
- [Ntp] Smearing Hal Murray
- Re: [Ntp] Smearing Tony Finch
- Re: [Ntp] Smearing Danny Mayer
- Re: [Ntp] Smearing Tony Finch
- Re: [Ntp] Smearing Danny Mayer
- Re: [Ntp] Smearing Tony Finch
- Re: [Ntp] Smearing Danny Mayer
- Re: [Ntp] Smearing Miroslav Lichvar
- Re: [Ntp] Smearing Tony Finch