Re: [Technical Errata Reported] RFC9002 (7539)

Ian Swett <ianswett@google.com> Sat, 23 September 2023 23:06 UTC

Return-Path: <ianswett@google.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 98764C151534 for <quic@ietfa.amsl.com>; Sat, 23 Sep 2023 16:06:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -22.607
X-Spam-Level:
X-Spam-Status: No, score=-22.607 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mvB9uvNauTDz for <quic@ietfa.amsl.com>; Sat, 23 Sep 2023 16:06:07 -0700 (PDT)
Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B3E73C14F74A for <quic@ietf.org>; Sat, 23 Sep 2023 16:06:07 -0700 (PDT)
Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-31f7400cb74so3773246f8f.2 for <quic@ietf.org>; Sat, 23 Sep 2023 16:06:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695510366; x=1696115166; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CloBtwn85wqhG0eLX0fqK6u3Zl2RHRnvB+hHF3v53UU=; b=1zOOxg9fXFJQ5LUQUUNELg1rOUGNVnWHOnIhUkNd+hIgSGZZCkMixftkc66nR/Tzgr q36R+f4bVVII0ips7z8k8JVPDLzhBcg90Yc9zOtA0oAk6GHjq6mcEvPOlxbPG4qmhUVq phj4NzBU19iEPJU35DdSqA9sS8IOO0imH1RFVkcHh7FgajB1DmunC/2JjvxnsZlyOvlk Ddg/5Wqgc0C05KxB6Dd/hptULTLlyWXI+Z0/USX1cFKbO38THfQ002xiwfqd4BZJ1DEW IVKpd4f3sCe0iwCMxrImj5uiktI4cXrle9DmnZFGoQN4XQ7xfoYuKrHIr7AgzvwmlxZ/ svuA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695510366; x=1696115166; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CloBtwn85wqhG0eLX0fqK6u3Zl2RHRnvB+hHF3v53UU=; b=eU8ptwpR8eozGv+XHsOgeiNim0MIYWP7lX7TabSz/ElidHnekw73wU/HheuEsy9cka ebEcwhC2KlubqOE++qNvNijUxnnCquE+som0VLlCRN/keesD2rEc/YiOXZKDuriCiSRp ij3HbnVvMGo3G2/AfRIeCGIpwRxPnL0mA42TN7Z0NGxsTI+62wUd63pbhpOFDU9VnKMt rQ7/7fWRd65CjdLjRrrEq05iAg6lTN3dZNviQpzGjMf/CsCXBwmmphI1hr4sq7nicMRl q5GTGL/9CpttrnKqeNDVTdAFbWeXVSAPBPrkh4rfoGQvUW/yvPyIzgkm5MaRBwsJsvNl gouA==
X-Gm-Message-State: AOJu0YzCqQef4fB/1T3+KjKpnTJKQpvdQK0s0ZfB2s568GIL7UUNbBmv gVlVcz+u79N6Aomx36Xec7iJHWPE2WxIe/Yrk9IXrw==
X-Google-Smtp-Source: AGHT+IGMOrem4m9/+X+JdrrbEgO9PYzFG0qrndvideMmEVwQ4ko0mG7qQ4lPp/z75Rhi6m1vdHVJGsLfF3pmf/r9SiU=
X-Received: by 2002:adf:f9cb:0:b0:319:7472:f0b6 with SMTP id w11-20020adff9cb000000b003197472f0b6mr3068003wrr.15.1695510365968; Sat, 23 Sep 2023 16:06:05 -0700 (PDT)
MIME-Version: 1.0
References: <20230607131951.E0E657FDE1@rfcpa.amsl.com> <CANatvzz-4D_Rki09kHgatLAsQ4-18HGFRX0_Wr+CVYoHTs-n3A@mail.gmail.com> <CAEh=tcd5acrk=oMEj7WRW-zVGM0HgHapm=6XO8_m3bh9X=X+Lg@mail.gmail.com> <ac781f62-537c-7713-4946-abe2328d3753@huitema.net>
In-Reply-To: <ac781f62-537c-7713-4946-abe2328d3753@huitema.net>
From: Ian Swett <ianswett@google.com>
Date: Sat, 23 Sep 2023 19:05:51 -0400
Message-ID: <CAKcm_gNxt-z3kYaVHLR0+uRCUE58gos6GiMJKabUCsXjVuQGGA@mail.gmail.com>
Subject: Re: [Technical Errata Reported] RFC9002 (7539)
To: Christian Huitema <huitema@huitema.net>
Cc: Zaheduzzaman Sarker <zahed.sarker.ietf@gmail.com>, Kazuho Oku <kazuhooku@gmail.com>, RFC Errata System <rfc-editor@rfc-editor.org>, jri.ietf@gmail.com, martin.h.duke@gmail.com, Zaheduzzaman.Sarker@ericsson.com, matt.joras@gmail.com, lucaspardue.24.7@gmail.com, pluknet@nginx.com, quic@ietf.org
Content-Type: multipart/alternative; boundary="0000000000001438c406060ec55d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/p0NYtleReW1m0zSuR9QJTQJJ7eI>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 23 Sep 2023 23:06:11 -0000

I agree this is an error in RFC9002.

Christian's suggestion is a good one, but I think it requires some
experimentation to understand what variance estimator would perform well in
practice.  We conducted a few experiments that used stdev and they didn't
perform better in the metrics we were tracking, unfortunately.

Ian

On Sun, Jun 11, 2023 at 10:08 PM Christian Huitema <huitema@huitema.net>
wrote:

>
>
> On 6/10/2023 4:32 PM, Zaheduzzaman Sarker wrote:
> > On Sat, Jun 10, 2023 at 1:13 AM Kazuho Oku <kazuhooku@gmail.com> wrote:
> >
> >>
> >> 2023年6月7日(水) 22:20 RFC Errata System <rfc-editor@rfc-editor.org>:
> >>
> >>> The following errata report has been submitted for RFC9002,
> >>> "QUIC Loss Detection and Congestion Control".
> >>>
> >>> --------------------------------------
> >>> You may review the report below and at:
> >>> https://www.rfc-editor.org/errata/eid7539
> >>>
> >>> --------------------------------------
> >>> Type: Technical
> >>> Reported by: Sergey Kandaurov <pluknet@nginx.com>
> >>>
> >>> Section: 5.3
> >>>
> >>> Original Text
> >>> -------------
> >>> smoothed_rtt = 7/8 * smoothed_rtt + 1/8 * adjusted_rtt
> >>> rttvar_sample = abs(smoothed_rtt - adjusted_rtt)
> >>> rttvar = 3/4 * rttvar + 1/4 * rttvar_sample
> >>>
> >>>
> >>> Corrected Text
> >>> --------------
> >>> rttvar_sample = abs(smoothed_rtt - adjusted_rtt)
> >>> rttvar = 3/4 * rttvar + 1/4 * rttvar_sample
> >>> smoothed_rtt = 7/8 * smoothed_rtt + 1/8 * adjusted_rtt
> >>>
> >>>
> >>> Notes
> >>> -----
> >>> Per Appendix A.7 of this RFC and Section 2 of the referred RFC 6298,
> >>> rttvar should be computed before updating smoothed_rtt itself.
> >>>
> >>
> >> To me it seems the errata is valid; in fact, quicly conforms to the
> >> "corrected" logic.
> >>
> >> Fortunately, the difference between the two logic seems small to me; in
> >> the original approach, rttvar will be 7/8 of the correct value. RTT
> >> estimates are going to differ among the implementations anyway (due to
> >> e.g., how frequently they are updated between transport protocols, ACK
> >> coalescing, etc.), so my humble guess is that 7/8 would not cause any
> >> issues.
> >>
> >
> > Thanks Kazuho. I have also got similar feedbacks from other implementers.
> > Based on this I will change the errata status to verified.
>
> I agree with Kazuho on this specific issue. This is indeed an errata.
>
> There is more to say about this all subject. Our RFCs are mechanically
> reproducing the algorithm designed by Van Jacobson in 1988. At the time,
> there was a premium on using as few instructions as possible, which
> means constraints in the algorithm design. For example, the formula in
> RFC 6298
>
> RTO = SRTT + max (G, K*RTTVAR)
> with K = 4
>
> is designed to ensure that the RTO only fires if the packet has a high
> probability of being lost. If the RTT distribution was Gaussian and the
> SRTT and RTTVAR represented the actual long term average and standard
> deviation, this would be a "4 sigma" probability, which is very low
> indeed. However:
>
> * the average of absolute differences is only an approximation of the
> standard deviation.
> * the delay distribution is not gaussian
> * the successive delay measurements are often highly correlated
> * because of correlation, too frequent RTT measurements cause the
> smoothed RTT to closely track the current RTT, and the RTTVAR to quickly
> trend to zero
>
> Maybe we should consider deprecating this old formula. After all, RACK
> does not really need it. Even if it did, there are measurements that are
> more robust, such as average or maximum over a sliding window of N RTT,
> or maybe over N congestion control epochs, with N depending on the
> congestion control algorithm.
>
> -- Christian Huitema
>