Re: [tcpm] [iccrg] Cwnd growth after fast convergence in CUBIC

Neal Cardwell <ncardwell@google.com> Fri, 06 November 2020 14:10 UTC

Return-Path: <ncardwell@google.com>
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 D8A253A11CF for <tcpm@ietfa.amsl.com>; Fri, 6 Nov 2020 06:10:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.6
X-Spam-Level:
X-Spam-Status: No, score=-17.6 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZskFFHtfdCsz for <tcpm@ietfa.amsl.com>; Fri, 6 Nov 2020 06:10:33 -0800 (PST)
Received: from mail-ua1-x92f.google.com (mail-ua1-x92f.google.com [IPv6:2607:f8b0:4864:20::92f]) (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 AF76E3A11C9 for <tcpm@ietf.org>; Fri, 6 Nov 2020 06:10:33 -0800 (PST)
Received: by mail-ua1-x92f.google.com with SMTP id 91so426982uar.5 for <tcpm@ietf.org>; Fri, 06 Nov 2020 06:10:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A3Og9aZePRqtwZDsqaPxN4XTl46G86vDz9hUFBWQgTI=; b=dmC8cZ1vyyxCuJoEY36Khc62+OVAi2gfStTVbEhM3mkTEKpOPgv/k7ltEIC9YV/IZh StkwBxPHOrh4+nm4GvwVmzL240fVnpXR/8LJ1MYxV21WhBLXOTgUJ0ZkEg1ly0o2Enuk t19uA1nZHypWsMpHcUrOc6C7jwqtu1Kr3o3lCpBpykWHMQnC++cnzXjJ1zhhb0lxo4K5 4V+eNrwpj6L0G2wYzgq4RuY4WmblDib5WlgosNSBz4XbJLFtOPZYHmA0IExdAB7eX40u iw3dCH+q+etliulw7j/OBvtYapNJqlUBcPMiMZLHqw4fqPzuUbsQ7jSPfBctNaoOKbco tQcA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A3Og9aZePRqtwZDsqaPxN4XTl46G86vDz9hUFBWQgTI=; b=GZcrVE0qhiqWA3bPnn+7tPQgBWOoT2rjT1hC8zzCm03CAWJrVWD4AcUlBO4nywLXvl dRsiRqrRUJxRK/5wXmJHv47TMOWR2pK0okD8TtgGQ9FpOWJgMFJTwRoC+aBG2jfqSYBi buYqKqu2R7RwW06K+q+UuDKg8tmIpoT9NUziksN40qP/EzRv185HMqqCG3/YNeimnQzX VsmVUeD74l9hgBhL9z5tVm2QFI3+nE2I8gNsZ8b++8FslIFnghUkk3bnQkkYhbsnG9LI 6yVK0XpBw5qSZdIElyqIgTNmu549nQMp4G8Bnk0ZMxW4tSDIe8mK8iFJaEPzPskE4cyM CaqQ==
X-Gm-Message-State: AOAM530f442OxqTvzy5Zx/njGTLPoi1ogmQPA/UKzvsqj/slPrUAUlZY b4uTnorKKf0FHMOpwamY9/NSI0xm0t3fYGMt4onJSg==
X-Google-Smtp-Source: ABdhPJw3VAS+XdM2tqZspoGETTgncVY/dmnljOVDyr3DgRt/J0KOknEuywIOrdaXSKsk0bIfbuQew95keST8GQ+yHw4=
X-Received: by 2002:ab0:424:: with SMTP id 33mr807086uav.33.1604671832394; Fri, 06 Nov 2020 06:10:32 -0800 (PST)
MIME-Version: 1.0
References: <C0FCC036-0040-4C2A-9C39-15DF1A9A1146@amazon.com> <DAB97903-5D7B-4310-9A66-0237CAE4428E@apple.com> <BC43606C-F2C7-4327-A43C-016B068514D0@eggert.org>
In-Reply-To: <BC43606C-F2C7-4327-A43C-016B068514D0@eggert.org>
From: Neal Cardwell <ncardwell@google.com>
Date: Fri, 06 Nov 2020 09:10:15 -0500
Message-ID: <CADVnQy=KS1q94OsLLi86S4_hG7v4V=o8zdeS+bk1-m8d-Tb_gQ@mail.gmail.com>
To: Lars Eggert <lars@eggert.org>
Cc: Vidhi Goel <vidhi_goel=40apple.com@dmarc.ietf.org>, "tcpm@ietf.org" <tcpm@ietf.org>, "Rosenblum, Wesley" <wesleyr=40amazon.com@dmarc.ietf.org>, Martin Thomson <mt@lowentropy.net>, iccrg IRTF list <iccrg@irtf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/xXQ_4sGpb2tMPgwQZfllvUX8r_M>
Subject: Re: [tcpm] [iccrg] Cwnd growth after fast convergence in CUBIC
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 06 Nov 2020 14:10:35 -0000

On Fri, Nov 6, 2020 at 3:28 AM Lars Eggert <lars@eggert.org> wrote:
> That said, the intent was to document what the Linux code was doing
> at the time. Is there a difference between the RFC and what Linux
> has been doing or is doing now? If yes, it might be time to revise
> the RFC.

Yes, it seems that this is a case where the RFC differs from the Linux
TCP CUBIC code.

The RFC says:
      K = cubic_root(W_max*(1-beta_cubic)/C) (Eq. 2)

which is equivalent to:
      K = cubic_root((W_max - W_max*beta_cubic)/C).  [B]

The Linux code does something different: it computes K once per epoch
immediately after the fast recovery or ECN cwnd reduction phase
completes, using:

      K = cubic_root((W_max - cwnd)/C).  [C]

See the computation of bic_K here:
  https://github.com/torvalds/linux/blob/master/net/ipv4/tcp_cubic.c#L254

For the non-fast-convergence case, the result of [B] and [C] are
equivalent, but for the fast convergence case they are not. So it
looks like in the case of fast convergence the RFC formula produces a
result that is incorrect, and does not match the Linux TCP CUBIC
behavior.

AFAICT,  changing Eq 2 to the following might fix the RFC and make it
match the Linux TCP CUBIC behavior:

      K = cubic_root(W_max - W_last_max*beta_cubic)/C) (Eq. 2)

best,
neal