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

Vidhi Goel <vidhi_goel@apple.com> Fri, 06 November 2020 04:45 UTC

Return-Path: <vidhi_goel@apple.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 4AAAC3A0CCB; Thu, 5 Nov 2020 20:45:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=apple.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 sy1QCpgz0beL; Thu, 5 Nov 2020 20:45:29 -0800 (PST)
Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9A4FE3A0C73; Thu, 5 Nov 2020 20:45:29 -0800 (PST)
Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.42/8.16.0.42) with SMTP id 0A64c7Ft001268; Thu, 5 Nov 2020 20:45:20 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=r9BrHqYAJqCPBaIZpYiUBy6M5myL0+4E/vxodOBDoA8=; b=Spt8/MMWSOLEdHIDkWaaSm1Pk6q4lQ9pD6ttXkJP5GB25SYebxZRWsjOUnijQBe+nq2u mMfdlOARTt0joNCC4+R/EJ5CTzWzXyCm5vPKt09hCWl/txLm5kN7zxPiM3m/XWFCJ0di 4C3b+doxvcxgjcB4Hfap0U3DuOgT+fRx/Fa40bMYOznDFMLqoQTd6rxA9H3dFLPl0xxE /5NYh/DnPbzaUnwW86KyEfMUVzyUASUQ8bltyVLz0MLy+86YIak23fr7hwF5cpDHC4E1 LBA11Qjo6sqSEbNGCsjf1C+bzb2lCNGYBhi3K26r5kFCs/lcCKFo2Axm54Y1VzvYZP5+ Qg==
Received: from rn-mailsvcp-mta-lapp02.rno.apple.com (rn-mailsvcp-mta-lapp02.rno.apple.com [10.225.203.150]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 34h6k4uv3e-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 05 Nov 2020 20:45:20 -0800
Received: from rn-mailsvcp-mmp-lapp02.rno.apple.com (rn-mailsvcp-mmp-lapp02.rno.apple.com [17.179.253.15]) by rn-mailsvcp-mta-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPS id <0QJC00SJ9YJJ4B50@rn-mailsvcp-mta-lapp02.rno.apple.com>; Thu, 05 Nov 2020 20:45:19 -0800 (PST)
Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp02.rno.apple.com by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) id <0QJC00M00YCWFI00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Thu, 05 Nov 2020 20:45:19 -0800 (PST)
X-Va-A:
X-Va-T-CD: 81ca60fce39c2560b6c4a7e5841f9b8f
X-Va-E-CD: 64c891999a622faf2fb6ed376907e689
X-Va-R-CD: 2a50cb2984bfcd8ac8065acd6fe50879
X-Va-CD: 0
X-Va-ID: 7944ec92-be68-440c-9829-5030ac8e7eb7
X-V-A:
X-V-T-CD: 81ca60fce39c2560b6c4a7e5841f9b8f
X-V-E-CD: 64c891999a622faf2fb6ed376907e689
X-V-R-CD: 2a50cb2984bfcd8ac8065acd6fe50879
X-V-CD: 0
X-V-ID: 2756571a-88e6-4f5d-99ba-340a5c2b2657
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-06_01:2020-11-05, 2020-11-06 signatures=0
Received: from [17.150.216.191] (unknown [17.150.216.191]) by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPSA id <0QJC00ECJYJIIB00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Thu, 05 Nov 2020 20:45:19 -0800 (PST)
From: Vidhi Goel <vidhi_goel@apple.com>
Message-id: <DAB97903-5D7B-4310-9A66-0237CAE4428E@apple.com>
Content-type: multipart/alternative; boundary="Apple-Mail=_DD06A1D3-FD5F-4D0F-AEA2-FED95F846665"
MIME-version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
Date: Thu, 05 Nov 2020 20:45:18 -0800
In-reply-to: <C0FCC036-0040-4C2A-9C39-15DF1A9A1146@amazon.com>
Cc: "tcpm@ietf.org" <tcpm@ietf.org>, Lars Eggert <lars@eggert.org>, iccrg@irtf.org
To: "Rosenblum, Wesley" <wesleyr=40amazon.com@dmarc.ietf.org>
References: <C0FCC036-0040-4C2A-9C39-15DF1A9A1146@amazon.com>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-06_01:2020-11-05, 2020-11-06 signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/2e1T3zSGaIHekhx0fNEvfCr9cP4>
Subject: Re: [tcpm] 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 04:45:34 -0000

+Lars and ICCRG

Hi Wesley,

I had noticed the same problem as you described when I implemented Cubic. This is my take on computing the K factor that avoids the situation of target cwnd <= cwnd.

W_max = cwnd = 100
Cwnd = cwnd * beta = 70 

W_max = W_max * 0.85 = 85

I simplified the formula to calculate K as below:

K = cbrt(W_max*(1-beta)/C)
=> K = cbrt(W_max - W_max * beta) / C)

// As I already computed cwnd = Wmax * beta, I replace it by cwnd (without the convergence factor)
=> K = cbrt(W_max - cwnd / C)

This ensures that the target cwnd is never below 70. 

IMO, we should not be applying beta to W_max after convergence factor has been applied in the K formula. Perhaps, it was an oversight in K’s formula.


Thanks,
Vidhi


> On Nov 5, 2020, at 11:32 AM, Rosenblum, Wesley <wesleyr=40amazon.com@dmarc.ietf.org> wrote:
> 
> In RFC8312, section 4.6, the fast convergence heuristic specifies to further reduce W_max when a decrease in available bandwidth is detected. After W_max has been further reduced, W_cubic(0) will be less than cwnd, since W_max is now less than the previous cwnd. When entering congestion avoidance, this can cause the target congestion window to be less than the current congestion window. For example, say cwnd = 100, beta_cubic = .7 and a congestion event occurs:
> 
> W_max = cwnd = 100;
> W_max = W_max*(1.0+beta_cubic)/2.0 = 85   // further reduce W_max for fast convergence
> 
> cwnd = cwnd * beta_cubic = 70	          // window reduction
> W_cubic(0) = W_max * beta_cubic = 59.5
> 
> If we were to enter congestion avoidance at this point, with a small enough RTT, the target candidate congestion window as calculated by W_cubic(t+RTT) may be less than the current congestion window (~59.5 < 70). 
> 
> My question is: How should the cwnd be adjusted in congestion avoidance when it is below the target candidate congestion window? If we were to follow section 4.3 and increment cwnd by (W_cubic(t+RTT) - cwnd)/cwnd, this would result in a negative increment, which doesn’t make sense to me. The Linux CUBIC implementation adds a “very small increment” in such a case: see https://github.com/torvalds/linux/blob/master/net/ipv4/tcp_cubic.c#L293-L297. Does anyone know why Linux adds that increment? My inclination is to just leave the cwnd as is and not make any adjustment when target cwnd <= cwnd, but I’m wondering if there is any other guidance for this case.
> 
> Thanks,
> Wesley
> 
> _______________________________________________
> tcpm mailing list
> tcpm@ietf.org
> https://www.ietf.org/mailman/listinfo/tcpm