Re: [Ntp] Antw: Re: Antw: [EXT] Re: I-D Action: draft-ietf-ntp-using-nts-for-ntp-27.txt

Ragnar Sundblad <ragge@netnod.se> Fri, 27 March 2020 07:46 UTC

Return-Path: <ragge@netnod.se>
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 1CF143A0F0B for <ntp@ietfa.amsl.com>; Fri, 27 Mar 2020 00:46:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=netnod-se.20150623.gappssmtp.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 NaH_Qri0Xzmm for <ntp@ietfa.amsl.com>; Fri, 27 Mar 2020 00:46:50 -0700 (PDT)
Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F12303A0F08 for <ntp@ietf.org>; Fri, 27 Mar 2020 00:46:49 -0700 (PDT)
Received: by mail-lj1-x22a.google.com with SMTP id f20so9238412ljm.0 for <ntp@ietf.org>; Fri, 27 Mar 2020 00:46:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netnod-se.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7jf9ITN1EPuWfKsH+/1cw8CIG4YOSTzEOLI4cKEpnUA=; b=dJnepkNQFXqbmsCTueVxIoYrDkyiWtl2Ul7L2qQVGzHD6KyX6Wm7BDr7TPBGzvsnve e/85ZChrCiQhLjlE+pu4CifpfQyvrnQNPF4I4vb8nQlL7/6lfJDGH6+yhBeevUiQL41D Qx46z6M9NCnHDUe1vzd3VeWB2mt/xrFr4MicAB9WHSzVyL+tH8SIdvToAD4Qq11eAXU3 W4ATcm7wVi3ZaeDqG1G7wWD1UFYdPixsLrSJ2J/TDItdbsfpDE4fPcJdMK1hBDzuaVrk d278SFdu4laq4ZoqPxnY3fYcadKK4CA762w5hy/cq/FZsXygeYrcsSoyVRPOgkZy5R4r Uc4g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7jf9ITN1EPuWfKsH+/1cw8CIG4YOSTzEOLI4cKEpnUA=; b=XSTLi2qki8f3DoEhvMsSINtP7KY26oLgZM/O97Gn8yQSo63p5+l1XzSGnt6Rfw3DOI 5Sw8JJAt5Db3AfFWjkOY+yQizXmafRUPyNdtUHSqQLA17arONz/JksSx+YRWtaXJrzlF aKfp9g6dMvltIUmy+zczZ3PefMaHP//K4eChgtsndozHQC+9PYVKEiHDZbIh2BKj890w r5fyGWXBwDCSuQahGgLDAZU/6hrvveG919K3KOsPpYutnBukXB4u62kp/nYIvlzUl3Gx 5fihDXTK6165pa4ifyTMsUA/4XikcPY9c9zVS4MEwC6q/vdHpPgsR5b8AyRtev2fmCmo rCaA==
X-Gm-Message-State: ANhLgQ27R/rT2VZ8uGMrtDYveuZ00gb/PmT05ibyO9p/7dJs1Z8n8xIk ZzfECB75TCPzv9Hnt7p8DhKlpQ==
X-Google-Smtp-Source: ADFU+vv13n6FGGxL4a0H5w3K9rSD0XfHs3dVfHVAGrHZspiRnRq4120x4oZkWaxe1PIxGdYrGqkZow==
X-Received: by 2002:a2e:9d98:: with SMTP id c24mr7224590ljj.137.1585295207932; Fri, 27 Mar 2020 00:46:47 -0700 (PDT)
Received: from [10.0.1.14] (h-122-211.A530.priv.bahnhof.se. [213.80.122.211]) by smtp.gmail.com with ESMTPSA id l11sm2625599lfg.87.2020.03.27.00.46.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2020 00:46:46 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Ragnar Sundblad <ragge@netnod.se>
In-Reply-To: <5E7DA42D020000A100037F60@gwsmtp.uni-regensburg.de>
Date: Fri, 27 Mar 2020 08:46:46 +0100
Cc: "ntp@ietf.org" <ntp@ietf.org>, mlichvar@redhat.com
Content-Transfer-Encoding: quoted-printable
Message-Id: <40513FEE-4D0F-49C7-9067-1987DDD94FB8@netnod.se>
References: <158507294813.11622.18159158243943940302@ietfa.amsl.com> <7711_1585137556_5E7B4794_7711_872_1_20200325115834.GC25803@localhost> <5E7B57D7020000A100037F20@gwsmtp.uni-regensburg.de> <618D4D47-8B22-4B7F-A355-0CB925B22ABB@netnod.se> <5E7DA42D020000A100037F60@gwsmtp.uni-regensburg.de>
To: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/x-cQUvIH2OeACoBZOS9dPY39uTQ>
Subject: Re: [Ntp] Antw: Re: Antw: [EXT] Re: I-D Action: draft-ietf-ntp-using-nts-for-ntp-27.txt
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, 27 Mar 2020 07:46:52 -0000


> On 27 Mar 2020, at 07:58, Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> wrote:
> 
>>>> Ragnar Sundblad <ragge@netnod.se> schrieb am 25.03.2020 um 15:58 in
> Nachricht
> <618D4D47-8B22-4B7F-A355-0CB925B22ABB@netnod.se>:
> 
>> 
>>> On 25 Mar 2020, at 14:08, Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
> 
>> wrote:
>>> 
>>>>>> Miroslav Lichvar <mlichvar@redhat.com> schrieb am 25.03.2020 um 12:58
> in
>>> Nachricht
>>> <7711_1585137556_5E7B4794_7711_872_1_20200325115834.GC25803@localhost>:
>>>> On Tue, Mar 24, 2020 at 11:02:28AM ‑0700, internet‑drafts@ietf.org wrote:
>>>>> A diff from the previous version is available at:
>>>>> https://www.ietf.org/rfcdiff?url2=draft‑ietf‑ntp‑using‑nts‑for‑ntp‑27 
>>>> 
>>>> One of the changes in the latest version is a new section on
>>>> recommended NTS‑KE retry intervals. There was some discussion in the
>>>> github issue #153 and there was a suggestion to continue here.
>>>> 
>>>> Does anyone else think that the minimum retry interval of 10 seconds
>>>> is way too short?
>>>> 
>>>> I think it should be at least 1024 seconds (corresponding to the
>>>> default NTP maxpoll), with an exception for retrying a TCP connection
>>>> when the server doesn't accept the connection, or it's closed before
>>>> the TLS handshake to implement a rate limiting. Is there anything else
>>>> that would be likely to change on the server for the NTS‑KE to succeed
>>>> just after 10 seconds?
>>>> 
>>>> In my tests NTS‑KE seems to be about 200x more expensive than an
>>>> NTS‑NTP (a single core handling about 500 NTS‑KE requests per second
>>>> or 100000 NTS‑NTP requests per second). That's with the AES‑NI
>>>> support.
>>>> 
>>>> A widely used polling interval of NTP clients is between 64 and 1024
>>>> seconds. That means a single NTS client retrying NTS‑KE after only 10
>>>> seconds wasted the same amount of resources as about 10000 clients
>>>> using only NTS‑NTP. That's crazy.
>>>> 
>>>> Yes, the server can limit the number of threads available to NTS‑KE or
>>>> limit the connection rate, but that will have a disproportionate
>>>> impact on clients using more reasonable retry intervals.
>>>> 
>>>> I suggest to modify the second paragraph of the section to the
>>>> following:
>>>> 
>>>> Clients SHOULD use an exponential backoff with a base of 2. The
>>>> initial retry interval SHOULD be at least 16 seconds if the previous
>>>> NTS‑KE connection failed, or the server closed it before the TLS
>>>> handshake, and 1024 seconds in other cases. The maximum interval
>>>> SHOULD be at least 524288 seconds (~6 days). The minimum interval in
>>>> seconds, t, for the nth retry can be calculated as
>>>> 
>>>> 		t = min(R * 2^(n‑1), 2^19)
>>>> 		where R is 16 or 1024 depending on the previous error
>>>> 
>>>> I suggest powers of 2 to make it compatibille with NTP polling
>>>> intervals and avoid floating point operations.
>>> 
>>> The only variable that is implicitly specified as 1 is how many failures
>>> should happen before the retry interval is extended according to the
>>> exponential backoff strategy. I can imaging a number like 2 or 3 being used
> 
>> as
>>> well.
>> 
>> Not really, since it says "nth retry”, and n is in the equation.
> 
> I was referring to the case "try < n", i.e. n is not incremented every try.

I don’t follow you - in my head, the nth retry is the nth retry, you
can not arbitrarily not count some retries. :-)

>>> I think it's more important that the interval should increase than 
>> specifying
>>> the actual numbers (initial value, maximum value).
>> 
>> Do you have something to support this?
> 
> It's like O(1) vs. O(n): O(1) may be slower for some cases, but eventually it
> will be faster than O(n). Simple as that.

I must have misread your first comment in some strange way, sorry!

I totally agree with you, and this is my point too regarding some issues
in these discussions.

>> We believe that this should work reasonable well for a typical traditional
>> ethernet LAN with few computers up to a datacenter booting or for a server
>> on the internet.
> 
> Technology changes: I can remember when a "fast" transfer rate via FTP was
> 2kB/s and packet response times were 100ms to 1.5s, the on a 10Mb LAN the
> response times were like 10ms, while I see < 1ms today. The number of servers
> increased dramatically since then.
> 
> Therefor I feel all concrete timeout or delay numbers in protocol
> specifications should be avoided if possible. (When Microsoft implemented DHCP
> they did not care about the timing specifications found in the RFC, making
> Microsoft DHCP "faster" than the standard)

So do we. That is why we also added:
"The exact workings of this will be
dependent on the application and operational experience gathered over
time.  Until such experience is available, this memo provides the
following suggestion."

This should also be read to imply that it will almost certainly not be
good values for a very low power application, very low bandwidth or very
slow networks, etc etc. It just should, we hope, work reasonably well,
for now, for the Internet, within a typical traditional LAN in a
home, datacenter or a campus/enterprise.
We had more expclicit text about this at first, but we removed the
specifics and generalised it, to keep it general and short.

>> Do you have any comments to my earlier reply (that I sent after this
> reply)?
>> 
>> (And, whatever we say, someone will be unhappy.)
> 
> Yes that's democracy; still we may express our opinions occasionally ;-)

Absolutely!
And, there is almost always something to learn from every opinion (it
may not have to do with the subject at hand, but something).


Best,

Ragnar