Re: [Ntp] Antw: Re: Antw: [EXT] Re: NTPv5 draft

Hal Murray <hmurray@megapathdsl.net> Tue, 01 December 2020 09:54 UTC

Return-Path: <hmurray@megapathdsl.net>
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 1DBD63A0FB0 for <ntp@ietfa.amsl.com>; Tue, 1 Dec 2020 01:54:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.038
X-Spam-Level: *
X-Spam-Status: No, score=1.038 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_DYNAMIC_IPADDR=1.951, PDS_RDNS_DYNAMIC_FP=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=no 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 Aoj2BoH2vmOY for <ntp@ietfa.amsl.com>; Tue, 1 Dec 2020 01:54:47 -0800 (PST)
Received: from ip-64-139-1-69.sjc.megapath.net (ip-64-139-1-69.sjc.megapath.net [64.139.1.69]) by ietfa.amsl.com (Postfix) with ESMTP id 056FC3A0FAF for <ntp@ietf.org>; Tue, 1 Dec 2020 01:54:46 -0800 (PST)
Received: from shuksan (localhost [127.0.0.1]) by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id 1470440605C; Tue, 1 Dec 2020 01:54:46 -0800 (PST)
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
cc: mlichvar@redhat.com, Steven Sommars <stevesommarsntp@gmail.com>, "ntp@ietf.org" <ntp@ietf.org>, Dieter Sibold <dsibold.ietf@gmail.com>, kurt@roeckx.be, hmurray@megapathdsl.net
From: Hal Murray <hmurray@megapathdsl.net>
In-Reply-To: Message from "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> of "Tue, 01 Dec 2020 10:22:59 +0100." <5FC60B73020000A10003D323@gwsmtp.uni-regensburg.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Tue, 01 Dec 2020 01:54:46 -0800
Message-Id: <20201201095446.1470440605C@ip-64-139-1-69.sjc.megapath.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/bp6wxYym3P4aIfITfJgN3t_CkCg>
Subject: Re: [Ntp] Antw: Re: Antw: [EXT] Re: NTPv5 draft
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, 01 Dec 2020 09:54:48 -0000

Ulrich.Windl@rz.uni-regensburg.de said:
> (Say your clock has 1ns resolution, but reading it takes 10 to 15 ns, maybe
> even longer if there's high system load).

That 10 or 15 ns is a pipeline delay.  It's not directly related to the clock 
precision.

The typical clock on an Intel PC uses the TSC which ticks at the CPU clock 
frequency.  If your CPU is running at more than 1 GHz, then the clock will be 
good to better than 1 ns.


Here is a histogram of how long it takes to read the clock on a Raspberry Pi.
(Raspberry Pi 3 Model B running Fedora aarch64)
        ns      hits
        52    497520
        53     45070
       104    381437
       105     75962
       156         4
7 samples were bigger than 2551.

So the clock is ticking at somewhere between 2 and 53 ns.

You can read a clock that ticks slowly with (much) more precision that its 
nominal period.  The classic example is the TOY/CMOS battery backed clock that 
only ticks once a second.  If you spin until it ticks, you can get much closer 
than 1 second.  "Spin until" may not be convenient for most applications.


-- 
These are my opinions.  I hate spam.