From nobody Tue Sep 13 14:06:27 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MRld00BkKz4cRxS; Tue, 13 Sep 2022 14:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MRlcz6mVfz3wPw; Tue, 13 Sep 2022 14:06:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663077987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u6CKL1SUZtwtebZXxqc8Vdr9qT6oFXiCwE1keHSSFMM=; b=jAvWSLpEVxV5hgjoQ0vio82FYgoaRqWovhN9wI4DYHUEYd/kwpZA8BD6tkwpue4JbIwuJw auEsfMXsm6TAdQ1AW0U17+NpNS3cG1MyhVWSMVRn7xY0ujbfuEwlDsVHVLyWemQXvCy9OH VSeMgH+mZy76nlrTBTpwLMHKtABVy6ugQRI6Y452MSb2ykVvIORIoZvuMS9+2OMKQEh/wj Bj/uxxn7OeGYEfpOTTyk5lnckCb6Cqgph+4OnHMtay75DuQALHN0I6mCbOj7CWVa3GS+8p BGy3O5gMaHtB3sE5tUwNHOrIJt1wN4Q5+EecKpfqwrXEqkdLNyCUAFlc6ZCt/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MRlcz5gyPzM0t; Tue, 13 Sep 2022 14:06:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28DE6RlE080676; Tue, 13 Sep 2022 14:06:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28DE6RmF080675; Tue, 13 Sep 2022 14:06:27 GMT (envelope-from git) Date: Tue, 13 Sep 2022 14:06:27 GMT Message-Id: <202209131406.28DE6RmF080675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: bb1d472d79f7 - main - tcp: make CUBIC the default congestion control mechanism. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb1d472d79f718296a2e9487dd0c219a9b67b2ff Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663077987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u6CKL1SUZtwtebZXxqc8Vdr9qT6oFXiCwE1keHSSFMM=; b=OQHH8AvWfbLxcnNLU8CuTxouYMCrNrN9FfHDte4kmrCdDTeUhtYPT31vov2pDqaCr5cbkd v3svbxNGKiCQNNmLs1WzbS261CvjinTVUuiO69wX+SY9OUN1Xea/vf2VgUbmRl3tdXP28M zsJqlblATBBayS3GKOnKuxww3MNRAIcoIbBhV9u0IRMX0KHesIvZnCm1SMLau8atz7uEIm 0IEi0d9qoeFMAT6g8jU5czIQusFEt8qt1u0GHM1/3iJyjxJhnLQ9MdeB2JIbH28/rwPcEt JJmmxAHtG13QvzaArGKeqQ5iVwpMTAYjbQzir1DqgeLlWPddLcDaJD6lupIjPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663077987; a=rsa-sha256; cv=none; b=PinQf1L0ByR0pgeEXR+qyeRDWdpId3eIZ8lCKnADoo/onqDrwsZ58/LUG4+LIk66+RWeMk JPA/ThW0VL/H9iMb55S0Kv9q+4dxMZrFKHlwyXu0WLNzok0qchjrQxkSKYAkP1CK2tas3M 31sk0CCW2tvH+2hSFU+waGPAfKVNmLTkOZHMdY41Zlg9TsHogVCpAff4BxSImhb3hw64qf 6D2LInfqYO1HbLLfPXJFy0sWtTUOn/cUgiPD9LCYKTcjVR45vFG+b58hM8R0TgOa8VcscG b26mLSJf7oqHen+dzDXU6klqWPv3A4M4mzTFL1w9aJM+ekXE1FKuNFc/Inl87g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=bb1d472d79f718296a2e9487dd0c219a9b67b2ff commit bb1d472d79f718296a2e9487dd0c219a9b67b2ff Author: Richard Scheffenegger AuthorDate: 2022-09-13 10:01:53 +0000 Commit: Richard Scheffenegger CommitDate: 2022-09-13 10:09:21 +0000 tcp: make CUBIC the default congestion control mechanism. This changes the default TCP Congestion Control (CC) to CUBIC. For small, transactional exchanges (e.g. web objects <15kB), this will not have a material effect. However, for long duration data transfers, CUBIC allocates a slightly higher fraction of the available bandwidth, when competing against NewReno CC. Reviewed By: tuexen, mav, #transport, guest-ccui, emaste Relnotes: Yes Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D36537 --- share/man/man4/cc_cubic.4 | 3 ++- share/man/man4/cc_newreno.4 | 3 +-- share/man/man4/mod_cc.4 | 14 +++++++------- sys/amd64/conf/DEFAULTS | 2 +- sys/arm/conf/DEFAULTS | 2 +- sys/arm/conf/std.armv6 | 3 +-- sys/arm/conf/std.armv7 | 3 +-- sys/arm64/conf/DEFAULTS | 2 +- sys/arm64/conf/std.arm64 | 3 +-- sys/conf/NOTES | 16 ++++++++-------- sys/i386/conf/DEFAULTS | 2 +- sys/netinet/cc/cc.c | 2 +- sys/powerpc/conf/DEFAULTS | 2 +- sys/riscv/conf/DEFAULTS | 2 +- 14 files changed, 28 insertions(+), 31 deletions(-) diff --git a/share/man/man4/cc_cubic.4 b/share/man/man4/cc_cubic.4 index 806d6aec2441..9ceaaa871777 100644 --- a/share/man/man4/cc_cubic.4 +++ b/share/man/man4/cc_cubic.4 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2021 +.Dd September 13, 2022 .Dt CC_CUBIC 4 .Os .Sh NAME @@ -39,6 +39,7 @@ .Sh DESCRIPTION The CUBIC congestion control algorithm was designed to provide increased throughput in fast and long-distance networks. +The CUBIC congestion control algorithm is the default for TCP. It attempts to maintain fairness when competing with legacy NewReno TCP in lower speed scenarios where NewReno is able to operate adequately. .Pp diff --git a/share/man/man4/cc_newreno.4 b/share/man/man4/cc_newreno.4 index 76dd3b2559bb..0d0f0d000d38 100644 --- a/share/man/man4/cc_newreno.4 +++ b/share/man/man4/cc_newreno.4 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2021 +.Dd September 13, 2022 .Dt CC_NEWRENO 4 .Os .Sh NAME @@ -39,7 +39,6 @@ .Sh SYNOPSIS .In netinet/cc/cc_newreno.h .Sh DESCRIPTION -The NewReno congestion control algorithm is the default for TCP. Details about the algorithm can be found in RFC5681. .Sh Socket Options The diff --git a/share/man/man4/mod_cc.4 b/share/man/man4/mod_cc.4 index a00f17ede5e4..a03ff0630c15 100644 --- a/share/man/man4/mod_cc.4 +++ b/share/man/man4/mod_cc.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2019 +.Dd September 13, 2022 .Dt MOD_CC 4 .Os .Sh NAME @@ -47,7 +47,7 @@ using the .Xr kld 4 facility. .Pp -The default algorithm is NewReno, and all connections use the default unless +The default algorithm is CUBIC, and all connections use the default unless explicitly overridden using the .Dv TCP_CONGESTION socket option (see @@ -127,7 +127,7 @@ For further explanation please see the internet-draft. .Pp Each congestion control module may also expose other MIB variables to control their behaviour. -Note that both newreno and cubic now support hystart++ based on the version 3 of the internet-draft. +Note that both NewReno and CUBIC now support Hystart++ based on the version 3 of the internet-draft. .Sh Kernel Configuration All of the available congestion control modules may also be loaded via kernel configutation options. @@ -138,10 +138,10 @@ Compilation of the kernel will fail if these two conditions are not met. The framework exposes the following kernel configuration options. .Bl -tag -width ".Va CC_NEWRENO" .It Va CC_NEWRENO -This directive loads the newreno congestion control algorithm and is included -in GENERIC by default. +This directive loads the NewReno congestion control algorithm. .It Va CC_CUBIC -This directive loads the cubic congestion control algorithm. +This directive loads the CUBIC congestion control algorithm and is included +in GENERIC by default. .It Va CC_VEGAS This directive loads the vegas congestion control algorithm, note that this algorithm also requires the TCP_HHOOK option as well. @@ -160,7 +160,7 @@ this algorithm also requires the TCP_HHOOK option as well. This directive loads the htcp congestion control algorithm. .It Va CC_DEFAULT This directive specifies the string that represents the name of the system default algorithm, the GENERIC kernel -defaults this to newreno. +defaults this to CUBIC. .El .Sh SEE ALSO .Xr cc_cdg 4 , diff --git a/sys/amd64/conf/DEFAULTS b/sys/amd64/conf/DEFAULTS index 5ea20c19f791..733823e931d6 100644 --- a/sys/amd64/conf/DEFAULTS +++ b/sys/amd64/conf/DEFAULTS @@ -22,6 +22,6 @@ options GEOM_PART_MBR options GEOM_PART_GPT # Default congestion control algorithm -options CC_NEWRENO # include newreno congestion control +options CC_CUBIC # include CUBIC congestion control options NEW_PCIB diff --git a/sys/arm/conf/DEFAULTS b/sys/arm/conf/DEFAULTS index 2e145585c7e8..e5533850aa36 100644 --- a/sys/arm/conf/DEFAULTS +++ b/sys/arm/conf/DEFAULTS @@ -6,5 +6,5 @@ device mem # Default congestion control algorithm -options CC_NEWRENO # include newreno congestion control +options CC_CUBIC # include CUBIC congestion control diff --git a/sys/arm/conf/std.armv6 b/sys/arm/conf/std.armv6 index 47724f176f4a..4826980da480 100644 --- a/sys/arm/conf/std.armv6 +++ b/sys/arm/conf/std.armv6 @@ -8,8 +8,7 @@ options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking options INET6 # IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. +options CC_CUBIC # include CUBIC congestion control options TCP_HHOOK # hhook(9) framework for TCP device crypto # core crypto support options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 diff --git a/sys/arm/conf/std.armv7 b/sys/arm/conf/std.armv7 index 88c963643a25..9412a8e92855 100644 --- a/sys/arm/conf/std.armv7 +++ b/sys/arm/conf/std.armv7 @@ -8,8 +8,7 @@ options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking options INET6 # IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. +options CC_CUBIC # include CUBIC congestion control options TCP_HHOOK # hhook(9) framework for TCP device crypto # core crypto support options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 diff --git a/sys/arm64/conf/DEFAULTS b/sys/arm64/conf/DEFAULTS index e2b034e94967..b0d2aa6c473b 100644 --- a/sys/arm64/conf/DEFAULTS +++ b/sys/arm64/conf/DEFAULTS @@ -14,6 +14,6 @@ options GEOM_PART_MBR options GEOM_PART_GPT # Default congestion control algorithm -options CC_NEWRENO # include newreno congestion control +options CC_CUBIC # include CUBIC congestion control options NEW_PCIB diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index 553e961dc0a2..c2a7e2b09afc 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -11,8 +11,7 @@ options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking options INET6 # IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. +options CC_CUBIC # include CUBIC congestion control options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options ROUTE_MPATH # Multipath routing support options FIB_ALGO # Modular fib lookups diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 455ae61ce135..434c739c8b21 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -651,13 +651,13 @@ options INET6 #IPv6 communications protocols # # Note if you include INET/INET6 or both options # You *must* define at least one of the congestion control -# options or the compile will fail. Generic defines -# options CC_NEWRENO. You also will need to specify -# a default or the compile of your kernel will fail -# as well. The string in default is the name of the +# options or the compile will fail. GENERIC defines +# options CC_CUBIC. You may want to specify a default +# if multiple congestion controls are compiled in. +# The string in default is the name of the # cc module as it would appear in the sysctl for -# setting the default. Generic defines newreno -# as shown below. +# setting the default. The code defines CUBIC +# as default, or the sole cc_module compiled in. # options CC_CDG options CC_CHD @@ -667,8 +667,8 @@ options CC_HD options CC_HTCP options CC_NEWRENO options CC_VEGAS -options CC_DEFAULT=\"newreno\" -options RATELIMIT # TX rate limiting support +options CC_DEFAULT=\"cubic\" +options RATELIMIT # TX rate limiting support options ROUTETABLES=2 # allocated fibs up to 65536. default is 1. # but that would be a bad idea as they are large. diff --git a/sys/i386/conf/DEFAULTS b/sys/i386/conf/DEFAULTS index 67328043a537..820ff0ff30f0 100644 --- a/sys/i386/conf/DEFAULTS +++ b/sys/i386/conf/DEFAULTS @@ -23,7 +23,7 @@ options GEOM_PART_MBR options GEOM_PART_GPT # Default congestion control algorithm -options CC_NEWRENO # include newreno congestion control +options CC_CUBIC # include CUBIC congestion control # enable support for native hardware device atpic diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index a009998ca920..0c2d6cb0e86d 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); * Have a sane default if no CC_DEFAULT is specified in the kernel config file. */ #ifndef CC_DEFAULT -#define CC_DEFAULT "newreno" +#define CC_DEFAULT "cubic" #endif uint32_t hystart_minrtt_thresh = 4000; diff --git a/sys/powerpc/conf/DEFAULTS b/sys/powerpc/conf/DEFAULTS index 9bf5e706b04a..984283c5bf5f 100644 --- a/sys/powerpc/conf/DEFAULTS +++ b/sys/powerpc/conf/DEFAULTS @@ -13,6 +13,6 @@ options GEOM_PART_BSD options GEOM_PART_MBR # Default congestion control algorithm -options CC_NEWRENO # include newreno congestion control +options CC_CUBIC # include CUBIC congestion control options NEW_PCIB diff --git a/sys/riscv/conf/DEFAULTS b/sys/riscv/conf/DEFAULTS index f18fdca0c001..d3d7229e0acc 100644 --- a/sys/riscv/conf/DEFAULTS +++ b/sys/riscv/conf/DEFAULTS @@ -13,6 +13,6 @@ options GEOM_PART_BSD options GEOM_PART_MBR # Default congestion control algorithm -options CC_NEWRENO # include newreno congestion control +options CC_CUBIC # include CUBIC congestion control options NEW_PCIB