Re: [Ntp] Antw: Re: Antw: [EXT] Minutes from IETF 108 NTP WG session

Hal Murray <hmurray@megapathdsl.net> Mon, 03 August 2020 12:12 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 8C3DC3A02BE for <ntp@ietfa.amsl.com>; Mon, 3 Aug 2020 05:12:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 3.608
X-Spam-Level: ***
X-Spam-Status: No, score=3.608 tagged_above=-999 required=5 tests=[HELO_DYNAMIC_IPADDR=3.243, RDNS_DYNAMIC=0.363, SPF_HELO_NONE=0.001, SPF_NONE=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 IS5Qje0sSK_b for <ntp@ietfa.amsl.com>; Mon, 3 Aug 2020 05:12:07 -0700 (PDT)
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 987A83A002C for <ntp@ietf.org>; Mon, 3 Aug 2020 05:12:07 -0700 (PDT)
Received: from shuksan (localhost [127.0.0.1]) by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id 36188406063; Mon, 3 Aug 2020 05:12:06 -0700 (PDT)
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
cc: "ntp@ietf.org" <ntp@ietf.org>, hmurray@megapathdsl.net
From: Hal Murray <hmurray@megapathdsl.net>
In-Reply-To: Message from "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> of "Mon, 03 Aug 2020 13:01:02 +0200." <5F27EE6E020000A10003A657@gwsmtp.uni-regensburg.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Mon, 03 Aug 2020 05:12:06 -0700
Message-Id: <20200803121206.36188406063@ip-64-139-1-69.sjc.megapath.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/WHrieZNs6nvi0oLhwzuW_T0V-eg>
Subject: Re: [Ntp] Antw: Re: Antw: [EXT] Minutes from IETF 108 NTP WG session
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, 03 Aug 2020 12:12:09 -0000

> (D)get_res: smallest delta is 0.000001514
> (D)get_res: smallest delta is 0.000000030

The first looks a little slow to me.  The second is typical of Linux on a 
reasonably modern Intel CPU.

There is a mechanism for reading the clock without doing a syscall.  man vdso 
for more info.

There is a "clocks" program in ntpsec/attic/

On recent Intel:
      res   avg      min  dups  CLOCK
        1    23       22        CLOCK_REALTIME
  1000000     7  1000012   -11  CLOCK_REALTIME_COARSE
        1    20       21        CLOCK_MONOTONIC
        1    22       27        CLOCK_MONOTONIC_RAW
        1    20       23        CLOCK_BOOTTIME

The -11 in the dups column means that all but 3 samples got the same time as 
the previous sample.

Histogram: CLOCK_REALTIME, 1 ns per bucket, 1000000 samples.
        ns      hits
        19    177480
        20    360015
        21    423042
        22     37224
        23        76
        24        46
        25        42
        26        45
        27        50
        28        60
1920 samples were bigger than 28.

Fedora on a Pi 3 in 64 bit mode.
      res   avg      min  dups  CLOCK
        1    77       52        CLOCK_REALTIME
 10000000    42  9999942    -3  CLOCK_REALTIME_COARSE
        1    69       52        CLOCK_MONOTONIC
        1    75       52        CLOCK_MONOTONIC_RAW
        1    69       52        CLOCK_BOOTTIME

Histogram: CLOCK_REALTIME, 1 ns per bucket, 1000000 samples.
        ns      hits
        52    647881
        53     58686
       104    244716
       105     48709
       157         2
       208         1
       209         2
3 samples were bigger than 2551.

Note the histogram takes big jumps.  The hardware clock ticks at 52 ns.  
Actually, a bit slower since a fraction of the ticks report 53 rather than 52.

Fedora on a Pi 3, 32 bit mode:
No vdso, so it's pretty slow.
      res   avg      min  dups  CLOCK
        1   891      833        CLOCK_REALTIME
  1000000   749  1000001  -717  CLOCK_REALTIME_COARSE
        1   906      833        CLOCK_MONOTONIC
        1   896      833        CLOCK_MONOTONIC_RAW
        1  1229     1145        CLOCK_BOOTTIME

Histogram: CLOCK_REALTIME, 1 ns per bucket, 1000000 samples.
        ns      hits
       833    289745
       834    145467
       885    326491
       886    235960
       937       294
       938       280
       989        60
       990        84
      1041        55
      1042       100
1464 samples were bigger than 1042.

Again, the steps are all multiples of 52 (or a bt over).



-- 
These are my opinions.  I hate spam.