Re: [iccrg] draft-briscoe-iccrg-prague-congestion-control: CE-marked bytes or packets?

Neal Cardwell <ncardwell@google.com> Fri, 12 August 2022 20:53 UTC

Return-Path: <ncardwell@google.com>
X-Original-To: iccrg@ietfa.amsl.com
Delivered-To: iccrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E540FC14CF18 for <iccrg@ietfa.amsl.com>; Fri, 12 Aug 2022 13:53:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.607
X-Spam-Level:
X-Spam-Status: No, score=-17.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, 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 VunKAmE5taMF for <iccrg@ietfa.amsl.com>; Fri, 12 Aug 2022 13:53:21 -0700 (PDT)
Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 B2902C14CF17 for <iccrg@irtf.org>; Fri, 12 Aug 2022 13:53:21 -0700 (PDT)
Received: by mail-qt1-x82c.google.com with SMTP id a4so1664356qto.10 for <iccrg@irtf.org>; Fri, 12 Aug 2022 13:53:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=k3FrIXRIgIk2ky3JCBm+UgcNLPgq1k3a3t6okSoK0g0=; b=ewIlNnFQCp0trqBnTtFuBeplD378Hrpdszpdt5buEdtFcUd0Ui1ausO75yHwoFVADr skJn/3TKEmwUq6+gCwNaKdZor6bVNKs0dLbhUKPJtAd+8AjTieGYgKnKQ3Gq7PihOwfu gga1msMGeyibF37NsXt4tZfa9t5s/3xkj5G0fdo1n/WEnxLkFJLNG/+K5uMnYgBjKYtZ xc9UyYYYKDGqPtXOD6AzHrmhq201tAvXIR2d6tkRlFKNpgtKvUKfYFlwBhEtyMMDN0G7 qZJuUSsG/HioaTG+wcMLakA6hsxEfF59N0+MDNI3Apdi5Wb7PpUjLFRrGoVBUDZjHYsC MqdA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=k3FrIXRIgIk2ky3JCBm+UgcNLPgq1k3a3t6okSoK0g0=; b=ZgpYBaidb1qZfzptupCQcdStMVE3UHRaLp0ckNrRY1dzdp/6c5Wqt+EYQR8elZ6WX6 ZvZHxpzM5XXPbWc1CSfqCkjLty8JMzNa/IIpnVQCbd3DKF5RxTPHcPPKaVgY99Hr8/fi Ip7pls5X236aDKdITimm7R4A+Rt+VyuF1ItQc6eBqNvbWmNjtOUT61TCXtJDLYcgFIxg iebVZQiOpZzOohUrd8Lai54IzkwcLBzwN/H7AIwXQOIqMJILroUXd0DNRjRIOothO31q Zej62nS5QvpA4g8QivLmgas3xovGik45syBdMU1/HoTnTWCd1ORJXiUcbV6uJFw4ZTFX Z3mA==
X-Gm-Message-State: ACgBeo1aNKv7+iC10tSKDA+bwQQaChNQErVOYcGXNBIKVpkGr7XATLtc jEApq1vj9cgHAUKOxhfA9ShUrNUe+4ETjbIwNlQ2mg==
X-Google-Smtp-Source: AA6agR44YG09boH0BbnfpG7GTUNMEoEzwrm8sN/tpXdTz8JAD6I3pNj5o1WMdhFvTz8u+MenQtJ85ekf00///mlvc4s=
X-Received: by 2002:ac8:584e:0:b0:343:781b:d15 with SMTP id h14-20020ac8584e000000b00343781b0d15mr3208268qth.560.1660337600466; Fri, 12 Aug 2022 13:53:20 -0700 (PDT)
MIME-Version: 1.0
References: <CADVnQykxwaqZTGXR-ZMYLEem0rKfAcT7KkHYgsF4dBdWvi2k4w@mail.gmail.com> <CADVnQykhS7XpCN3ntODEsRJH_ch9V3M-zdr1yUXqhaK2SH1Uew@mail.gmail.com> <E24CC21F-CD26-44FC-9FA1-A2294BC71167@gmx.de>
In-Reply-To: <E24CC21F-CD26-44FC-9FA1-A2294BC71167@gmx.de>
From: Neal Cardwell <ncardwell@google.com>
Date: Fri, 12 Aug 2022 16:53:04 -0400
Message-ID: <CADVnQykTWf4GnLrF4iL0S86Qb=F8XoXwaoycZ9f=URPf6yJdUA@mail.gmail.com>
To: Sebastian Moeller <moeller0@gmx.de>
Cc: iccrg IRTF list <iccrg@irtf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/iccrg/S1HCfMgG-SpxmRZpGjB_ZMQFMGw>
Subject: Re: [iccrg] draft-briscoe-iccrg-prague-congestion-control: CE-marked bytes or packets?
X-BeenThere: iccrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Discussions of Internet Congestion Control Research Group \(ICCRG\)" <iccrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/iccrg>, <mailto:iccrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/iccrg/>
List-Post: <mailto:iccrg@irtf.org>
List-Help: <mailto:iccrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/iccrg>, <mailto:iccrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Aug 2022 20:53:26 -0000

Hi Sebastian,

Thanks for raising that. I'm afraid I won't have time to read and
comment on the draft for ECN encapsulation (
https://datatracker.ietf.org/doc/html/draft-ietf-tsvwg-ecn-encap-guidelines-17
).

best regards,
neal

On Thu, Aug 11, 2022 at 1:36 PM Sebastian Moeller <moeller0@gmx.de> wrote:
>
> Dear Neal,
>
> over in the tsvwg we have a draft for ECN encapsulation (https://datatracker.ietf.org/doc/html/draft-ietf-tsvwg-ecn-encap-guidelines-17) where section 4.6 touches the same issue (especially goal #2 and its example implementation is aimed at propagating CE marks in a way that roughly conserves the number of marked bytes*). It would be great if you could have a look at that section and maybe post comments over in the tsvwg list?
>
> Thanks in advance
>         Sebastian
>
> *) The proposed method clearly is incomplete and feels like it was devised in a text editor and is not a description of implemented and working code, which fits with your observation that eve TCP Prague uses packet marking over byte marking logic. My personal preference (for what it is worth) would be not to include incomplete methods and examples in an RFC that have never been put to a real test.
>
>
>
> > On Aug 11, 2022, at 16:43, Neal Cardwell <ncardwell=40google.com@dmarc.ietf.org> wrote:
> >
> > Another argument against byte-counting ECN responses:
> >
> > (4) The fact that Prague updates its EWMA alpha once per round trip seems to suggest that it is trying to maintain a time-weighted marking probability, since it is effectively taking one "frac" sample per round trip. If byte-based weighting was really preferable, then presumably the EWMA alpha should be updated per equal volume of data delivered, e.g. updating the EWMA alpha per 100 KBytes of data delivered. Since Prague updates the EWMA alpha once per round trip, the EWMA will diverge wildly from the inter-round-trip byte weighting if the volumes of data (in bytes) in each round trip diverge widely, which is quite common for web or RPC traffic.
> >
> > best regards,
> > neal
> >
> >
> >
> > On Wed, Aug 10, 2022 at 6:11 PM Neal Cardwell <ncardwell@google.com> wrote:
> > Re:
> >   https://datatracker.ietf.org/doc/html/draft-briscoe-iccrg-prague-congestion-control-01
> >
> > and the passages:
> >
> > "2.3.2.  Moving Average of ECN Feedback
> > ...it measures the fraction, frac, of ACKed bytes that carried ECN
> > feedback over the previous round trip. ...
> >
> > 2.4.3.  Additive Increase and ECN Feedback
> > ...a Prague CC applies additive increase irrespective of its CWR
> > state, but only for bytes that have been ACK'd without ECN feedback.
> > ...  This approach reduces additive increase as the marking
> > probability increases..."
> >
> > I was curious about the design choice to specify that the algorithm
> > reacts to the fraction of *bytes* that have been CE-marked instead of
> > the fraction of *packets*. IMHO it would be useful for the document to
> > outline the motivation.
> >
> > Apologies if I have missed this in previous e-mail discussions or
> > presentations. I may well have. :-)
> >
> > I can imagine a number of potential reasons why it could be
> > advantageous to react to the fraction of packets CE-marked rather than
> > the fraction of bytes CE-marked:
> >
> > (1) AFAICT byte counters distort the path's ECN marking probability
> > more than using packet counters. For example, suppose we have a round
> > trip with 100 packets sent at roughly uniform intervals across the
> > round trip time:
> >
> > o  99 packets of 1 byte each, all CE-marked
> > o 1 packet of 1000 bytes that was not CE-marked
> >
> > Then the byte-based Prague "frac" ("the fraction, frac, of ACKed bytes
> > that carried ECN feedback over the previous round trip") is:
> >
> >   99 bytes / 1099 bytes ~= .09
> >
> > Whereas the fraction of ACKed packets that carried ECN feedback is:
> >
> >    99 packets / 100 packet = .99
> >
> > So in this toy example there is a >10x difference in the CE "frac"
> > signal depending on whether bytes or packets are counted.
> >
> > And given that these packets were spaced uniformly across the round
> > trip, 99% of the time the bottleneck had excess queuing. This 99%
> > number is well reflected in a packet-based "frac", but seems to imply
> > that the byte-based "frac" approach dramatically underestimates the
> > probability that a packet will encounter excessive queuing, aka the
> > packet CE marking probability.
> >
> > The Prague draft in section 1 mentions:
> >
> > " The Prague CC is a particular instance of a scalable congestion control. ...
> > For a scalable congestion control B=1, so its response function takes
> > the form cwnd = K/p. ...
> > p:  Steady-state probability of drop or marking"
> >
> > So Prague is defined as a scalable congestion control, which has a
> > response function that is a function of the probability of ECN
> > marking. But AFAICT the "frac" mentioned in the Prague spec is a
> > byte-weighted number, and by contrast the fraction of *packets*
> > CE-marked is a much better estimate of the probability of a packet
> > being CE-marked (which is my interpretation of the somewhat ambiguous
> > "probability of drop or marking").
> >
> > (2) The current Linux TCP reference implementation of TCP Prague does
> > not actually use bytes; it uses packets. Likewise, DCTCP and BBRv2 use
> > packets rather than bytes. So AFAIK the real-world deployment
> > experience with shallow-threshold ECN thus far is almost entirely with
> > packet-based algorithms rather than byte-based algorithms. It seems
> > risky to specify Prague with a byte-based approach that has not been
> > tested, especially given that the byte-based and packet-based
> > algorithms can measure massively different signals in some cases (see
> > (1) above).
> >
> > (3) AFAIK byte counters are not available when relying on the AccECN
> > ACE field if there is ACK loss, since the CE marks counted in the ACE
> > field cannot be properly matched against the size of segments that
> > were already ACKed and freed. So in environments where only the ACE
> > field is available then this would imply that TCP Prague cannot be
> > used (since Prague is specified only in bytes). This would seem to
> > significantly limit the utility of the ACE field and/or byte-based
> > Prague, in such scenarios. If Prague were defined in terms of packets
> > then it seems that perhaps it could be more likely to be useful in
> > paths that only support the ACE field and strip out the AccECN option?
> >
> >
> > In summary, if byte counting is considered preferable, IMHO it would
> > be good to document in this draft why this is so, change the Linux TCP
> > Prague code to use the byte-based approach, and then for the
> > definition of "p" in the draft to specify that it means the
> > probability that a payload "byte" is CE marked rather than leaving the
> > bytes/packets distinction ambiguous.
> >
> > best regards,
> > neal
> > _______________________________________________
> > iccrg mailing list
> > iccrg@irtf.org
> > https://www.irtf.org/mailman/listinfo/iccrg
>