Re: [tcpm] Cubic after RTO

rs.ietf@gmx.at Thu, 22 February 2024 17:53 UTC

Return-Path: <rs.ietf@gmx.at>
X-Original-To: tcpm@ietfa.amsl.com
Delivered-To: tcpm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 86D0AC18DB87 for <tcpm@ietfa.amsl.com>; Thu, 22 Feb 2024 09:53:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.106
X-Spam-Level:
X-Spam-Status: No, score=-7.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, 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] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmx.at
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 FEaUx6aBfhRC for <tcpm@ietfa.amsl.com>; Thu, 22 Feb 2024 09:52:59 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E7EC2C180B78 for <tcpm@ietf.org>; Thu, 22 Feb 2024 09:52:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1708624365; x=1709229165; i=rs.ietf@gmx.at; bh=6NTGpAyA4ZsL+X8WoOe927QfQilhNA4zJnRGn61yTvo=; h=X-UI-Sender-Class:Date:From:Reply-To:Subject:To:Cc:References: In-Reply-To; b=Bo6rMRDppgMBfwLq6R1DgSFDv716jsCVk1r1ERyQ2Z5XyE2vQETxBUK0LUXNSb3t 43361teSMjTsX3o244J3noJRZtlhr7J431ceU6vfi8BAzkFkcpwOuL7cr87iVjQ2O yu+ESRgOMyQ0cs2PBd1eSy67/1v4+V/lKrXMJbQMHj4gAz3C34K16wNhjJtjXjCYP DZjK/T7WSeZ+mTZ+L4x7vd2DpvtvzIAtHvL/omUfjXclfBwtxcbyM5O5lfC43+ubE Zso5jTV92LR/h6aoXGN5F+9WAae0b/289gRIwjaln4/8x7PTy2JPLhslDrLeolteA YSl94L9O0YzhF/pbDQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [10.249.67.244] ([217.70.210.60]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MKsnF-1rMVAu1GbV-00LCYv; Thu, 22 Feb 2024 18:52:45 +0100
Message-ID: <ff4e5a07-61cf-43d7-acc5-f7c1975ecd8c@gmx.at>
Date: Thu, 22 Feb 2024 18:52:44 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: rs.ietf@gmx.at
Reply-To: rs.ietf@gmx.at
To: Neal Cardwell <ncardwell@google.com>
Cc: "tcpm@ietf.org" <tcpm@ietf.org>, Vidhi Goel <vidhi_goel@apple.com>, Yuchung Cheng <ycheng@google.com>
References: <efae63cc-1de2-4a20-9379-80a2067a67a5@gmx.at> <CADVnQynADEb5LWpCFxDa5Etxqtn9UDu4CtpMZn+_ozs=SY1ytQ@mail.gmail.com>
In-Reply-To: <CADVnQynADEb5LWpCFxDa5Etxqtn9UDu4CtpMZn+_ozs=SY1ytQ@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:HAivvd0zCAaMkNssB2hiBQzvvCtamgt8QAyPF7I6gZOGeUK8xWR XDftJ9JU5MbOKDeQ9sostt2kMmGy4jStpFA9Zjuh8o10TSVlxQ4ruICi5AwqhuL588ozJPN QmeTZrqXkKKrFmQ6kSWudaa+QhK+kLORVQvKWFFPLK0O+UeTup7/XdM2hsTINIlP/eDqlSu erBlTg6LgP5SWBptbTVBg==
UI-OutboundReport: notjunk:1;M01:P0:bIuGewsgeZo=;Bbp0E781TAVgk1Q8g+ViY/5fG9C A5ayvc+q74FOJ3PDtXeO/yCpdatQ40PS+XQMUlUtAvx3D5XdEAzeCf8RSMAIPay2lwpwUp2/8 QeBR63LtPDrpjT9pKQXel+fU1hSu/CSe56DC/MpXgVS1veOY7+VYfVwM5R1Cy0kh80U6+9BUm u52+XzTSe7SlAMorcHmirLr1mibAoh5w54QnKriTEkGN2aGkmARxMRFiXk8DY0Z3CDhIPHDRJ 6+EzFHmER+7NyKfLC+sW1u4Ac5Lhj3rtif1NbqJa05aIAcPhtkPeTBiPXMhUngtKJWwmbXQIy MsCbFYgBsYFmT/NKdLcTCCJtCItwQKs7FeroR4FRVZt70wEZEDVIMhWaN6UdRA0Sm7ikMV5W/ /9hYuUOshuYOFodG/9S/eXxJrLXs+3bpXDdlfu8OxupixEKyP9HMsiroTTAV4rgGRKI9q1n1f ZolsmDKomwOSDKMaov1VtY5XtrRayiWY5+k4kXxFHUR88YMuJHMeqaysPvlyoB4evz1HcJ1Ev tBS2/32R97aLZgGJACbmuQ662uJCVHZOZ9Pg6+HL88V//YWSLfwUQe7GgNmYi+q59DgDFidBg 6gul97j1i3LOI+JlH6aWi4uJzJNkOnAz7lVlNlc0BCxtyeGPM5Fsu8HnVrVTScgNhNMEjHOTQ cTLGfBZmk2oexOpi+xdCAB4by8C4iTavP0/ild1BOiQT9ZrH7ckaOcvpUgsbDzF5FPxXdmWgv RVLN5BLd7qXOK08CxY3ExaRiYHIfoiCdPFuMp1z5iEHuuxImwE1diuEDx62bfUSsRsik0hewA okbBjYuwAqf9+lbH4MYvQ7CW9O9RmwnWNaMJv+L8IRWM0=
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/VOjls1U009zsZqzQ1B4euZ0M9Dc>
Subject: Re: [tcpm] Cubic after RTO
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpm/>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Feb 2024 17:53:03 -0000

Thanks Neal!

It seems the quote could be misread to the "last" CA phase. Your
comments make it now more clear - and I need to push the t_epoch =
curtime to when cwnd first crosses ssthresh as well...

Am 22.02.2024 um 16:18 schrieb Neal Cardwell:
>
>
> On Thu, Feb 22, 2024 at 9:10 AM Scheffenegger, Richard <rs.ietf@gmx.at
> <mailto:rs.ietf@gmx.at>> wrote:
>
>     Group,
>
>     I need some help to understand where I seem to be missing something
>     around RFC9438 (Cubic) and the Behavior after RTO...
>
>         > During the first congestion avoidance stage after a timeout, CUBIC
>         > increases its congestion window size using Figure 1, where t
>     is the
>         > elapsed time since the beginning of the current congestion
>     avoidance
>         > stage, K is set to 0, and Wmax is set to the congestion window
>     size
>         > at the beginning of the current congestion avoidance stage. In
>         > addition, for the Reno-friendly region, West SHOULD be set to the
>         > congestion window size at the beginning of the current congestion
>         > avoidance stage.
>
>     Let's assume, the RTT is around 10ms, and there is one CC event every 10
>     RTTs - or 100ms.
>
>     Now, with the above definition, if now a chain of RTOs happen, t_epoch
>     is not reset at all, but may be many orders of magnitute in time in the
>     past, compared with the "steady state" - especially when there are a
>     number of subsequent RTOs with exponential backoff.
>
>
> In the RFC and in the Linux TCP CUBIC code, t_epoch *is* reset. :-) Note
> that the RFC says:
>
> "t is the elapsed time since the beginning of the current congestion
> avoidance stage"
>
> The CUBIC curve is only used during the congestion avoidance stage,
> meaning cwnd > ssthresh. And this "t is the elapsed time since the
> beginning of the current congestion avoidance stage" means that
> basically t_epoch (where per the RFC t_epoch is "The time in seconds at
> which the current congestion avoidance stage started") is set to "now"
> every time that the connection enters congestion avoidance (meaning cwnd
> cross above ssthresh).
>
> That means that there is no concern with multiple RTO recoveries causing
> t_epoch to be far in the past. Because t_epoch is set to "now" every
> time the connection crosses into congestion avoidance and starts using
> the CUBIC curve computation to set the cwnd.
>
> That's how the Linux code works as well. Every time there's a fast
> recovery or RTO event, Linux TCP CUBIC sets ca->epoch_start to 0 (code
> link
> <https://elixir.bootlin.com/linux/v6.7/source/net/ipv4/tcp_cubic.c#L346>). Then, when in congestion avoidance, when CUBIC seesca->epoch_start is 0 (code link <https://elixir.bootlin.com/linux/v6.7/source/net/ipv4/tcp_cubic.c#L235>), it sets ca->epoch_start = tcp_jiffies32, meaning it sets t_epoch to now.
>
> best regards,
> neal
>
>
>     As K is also reset, the next ACK after RTO received will result in cwnd
>     to be calculated (by fig 1)
>
>     Wcubic(t) = C * (t - K)^3 + Wmax
>
>     With C = 0.4, K = 0, and t may be even higher than 60 sec - and not the
>     "normal" 0.1 sec. This results in cwnd to be set to 0.4 * 60^3 + Wmax
>     [segments] 86400 segments + the prior maximum cwnd - which doesn't sound
>     correct...
>
>
>     What is the linux implementation (as the baseline) actually doing after
>     RTO here?
>
>     Thanks,
>         Richard
>
>