summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/common-config.nix
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-02-23 18:45:29 +0100
committerMichael Weiss <dev.primeos@gmail.com>2020-03-02 10:57:47 +0100
commit60f4345e37d6b4c02ab8ca8fa104ae8a32ccf856 (patch)
treec2e30a74ba260a0622b3bf82b07de46dbfffd90d /pkgs/os-specific/linux/kernel/common-config.nix
parentc3c47544e06cc028f1a9b590e7e16edddce8b2ee (diff)
downloadnixpkgs-60f4345e37d6b4c02ab8ca8fa104ae8a32ccf856.tar
nixpkgs-60f4345e37d6b4c02ab8ca8fa104ae8a32ccf856.tar.gz
nixpkgs-60f4345e37d6b4c02ab8ca8fa104ae8a32ccf856.tar.bz2
nixpkgs-60f4345e37d6b4c02ab8ca8fa104ae8a32ccf856.tar.lz
nixpkgs-60f4345e37d6b4c02ab8ca8fa104ae8a32ccf856.tar.xz
nixpkgs-60f4345e37d6b4c02ab8ca8fa104ae8a32ccf856.tar.zst
nixpkgs-60f4345e37d6b4c02ab8ca8fa104ae8a32ccf856.zip
linux config: Set TCP_CONG_CUBIC=yes to restore the default
This will switch the default TCP congestion control algorithm from
new Reno to CUBIC. CUBIC is the default since Linux kernel 2.6.19
(see 597811ec167fa) and most (all?) distributions keep this default
(e.g. Debian and Ubuntu). On NixOS the default was still new Reno
because generate-config.pl changes TCP_CONG_CUBIC from y to m (since we
try to build everything as a module by default).

To check the active and available algorithms:
$ sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = cubic
$ sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = cubic reno

Note: E.g. x86_64_defconfig sets TCP_CONG_CUBIC=y indirectly via
CONFIG_TCP_CONG_ADVANCED=y (but CUBIC is also the default if set to no,
see net/ipv4/Kconfig).
Diffstat (limited to 'pkgs/os-specific/linux/kernel/common-config.nix')
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index f9579a9fde5..dbac890dfd1 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -120,6 +120,7 @@ let
       XDP_SOCKETS        = whenAtLeast "4.19" yes;
       XDP_SOCKETS_DIAG   = whenAtLeast "4.19" yes;
       WAN                = yes;
+      TCP_CONG_CUBIC     = yes; # This is the default congestion control algorithm since 2.6.19
       # Required by systemd per-cgroup firewalling
       CGROUP_BPF                  = option yes;
       CGROUP_NET_PRIO             = yes; # Required by systemd