Re: [quicwg/base-drafts] Clarify RTT calculations in recovery (#2506)

Martin Thomson <notifications@github.com> Wed, 20 March 2019 21:24 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C38B6131150 for <quic-issues@ietfa.amsl.com>; Wed, 20 Mar 2019 14:24:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.001
X-Spam-Level:
X-Spam-Status: No, score=-3.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.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 ujsU75rbD-A3 for <quic-issues@ietfa.amsl.com>; Wed, 20 Mar 2019 14:24:27 -0700 (PDT)
Received: from o11.sgmail.github.com (o11.sgmail.github.com [167.89.101.202]) (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 B5DD713111D for <quic-issues@ietf.org>; Wed, 20 Mar 2019 14:24:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=uuTZeFofl5lXPoRao585XAh+gzY=; b=aQ8RIZqr86F/Lppx 5giHnbwRVjix5vNb0hEtl72nYZg15zyZ1BOJl1Jr/BdpUp7ELD1G0dsdZKbRUPTv 8oydzSrCgB+zx/+suJ1+Mzq0JFJ6MwYYMX63AjKDXW8XmNp7NPiAUouPGBZcPM79 UM3ZEyVi8muB0ircmsz0y9f8wto=
Received: by filter1584p1mdw1.sendgrid.net with SMTP id filter1584p1mdw1-19476-5C92AF88-28 2019-03-20 21:24:24.636493242 +0000 UTC m=+176370.364127026
Received: from github-lowworker-89d05ac.cp1-iad.github.net (unknown [192.30.252.35]) by ismtpd0053p1mdw1.sendgrid.net (SG) with ESMTP id EawYuLDuSMiPI8eaZvJ0-g for <quic-issues@ietf.org>; Wed, 20 Mar 2019 21:24:24.550 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker-89d05ac.cp1-iad.github.net (Postfix) with ESMTP id 5F57BAE0301 for <quic-issues@ietf.org>; Wed, 20 Mar 2019 14:24:24 -0700 (PDT)
Date: Wed, 20 Mar 2019 21:24:24 +0000
From: Martin Thomson <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abeae0916c8332b1dd5f7212a784ab288a0d87311092cf0000000118aa718892a169ce18f867ef@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/2506/review/216985589@github.com>
In-Reply-To: <quicwg/base-drafts/pull/2506@github.com>
References: <quicwg/base-drafts/pull/2506@github.com>
Subject: Re: [quicwg/base-drafts] Clarify RTT calculations in recovery (#2506)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5c92af885c92c_44ed3f7f420d45c02115cd"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: martinthomson
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak14TuKQe0kRd+p/o2BwBZsstoSl0J6VLeSwg2 N5SF10HIzlL5FB5DRQNsoGrTqb2ECJYpeBhs7RYCRpm2dOnyzcLm3nvAhNOhM2Mw/Jn2s2eGDqoXD6 7YzmO/4zMGbseRb1Nlgd0yBJ/bP4RHp9neOn4odfZg4jq2I+8mC9HIsGNP3QTr0ZzfuuQHQlZ82t2m 8=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/VcHt2AtzaIxwGqVjTMTO5GvQUj8>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Mar 2019 21:24:30 -0000

martinthomson commented on this pull request.

Meta-level comments.  The code and text look fine.

> @@ -330,6 +330,31 @@ min_rtt is the minimum RTT measured over the connection, prior to adjusting by
 ack delay.  Ignoring ack delay for min RTT prevents intentional or unintentional
 underestimation of min RTT, which in turn prevents underestimating smoothed RTT.
 
+A sender calculates both smoothed RTT (SRTT) and RTT variance (RTTVAR) similar
+to those specified in {{?RFC6298}}, see {{on-ack-received}}.
+
+On every newly acknowledged ack-eliciting largest acked:
+~~~
+latest_rtt = ack_time - send_time_of_largest_acked
+~~~
+
+First RTT sample:
+~~~
+min_rtt = latest_rtt
+smoothed_rtt = latest_rtt

So no ack delay here at all?  That probably needs explanation.

> @@ -330,6 +330,31 @@ min_rtt is the minimum RTT measured over the connection, prior to adjusting by
 ack delay.  Ignoring ack delay for min RTT prevents intentional or unintentional
 underestimation of min RTT, which in turn prevents underestimating smoothed RTT.

I find the structure of this section to be a little hard to follow.  I think that you want to lay it out differently.

The baseline concepts here are:

1. the observed RTT (latest_rtt in the code), which includes any processing delays on the receiver end

2. minimum RTT, which is set to the minimum observed RTT for the path.  this doesn't include any processing delays on the receiver end, which might inflate the value a little, but we assume that receivers will immediately acknowledge a packet at some point (usually this is a good idea for a new path, and handshaking more or less depends on that)

3. ack delay, which captures the processing time and any forced delays on the receiver.  This is limited to the maximum value the receiver advertises.  This value is self-reported, so any error needs to result in using less network capacity, not more, or it could be used to increase network load inappropriately.  The goal here is to have an RTT estimate that is larger.  Thus, the design is such that if ACK delay is under-reported, or the maximum is set lower than the reality, this will result in an inflated RTT estimate.  If this is over-reported, the maximum will cap the value and again cause the RTT estimate to be driven up also.

4. The final RTT calculation.  This is calculated based on the observed RTT and the adjusted ack delay.  The value is smoothed so that some history is retained.

This structure matches the code, and I think 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/2506#pullrequestreview-216985589