New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux config: Set TCP_CONG_CUBIC=yes to restore the default #81500
Conversation
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).
I think you want to set |
No, that wasn't my intention but I didn't check if that would work as well (i.e. automatically load the module - this might not work and especially at early boot it wouldn't). The upstream default is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked Arch Linux and Debian, they indeed do it this way.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
@Emantor thank you very much for your review! :) @edolstra @NeQuissimus @dezgeg ( My main motivation for this PR is to stick to the upstream default. I didn't have a closer look at benchmarks (which is probably difficult anyway as this depends a lot on the setup, usage, and goals (e.g. latency vs. speed)). But for a normal user this change should be completely transparent. If desired I could also write a release notes entry, I'm just not sure if this change is that relevant. |
linux config: Set TCP_CONG_CUBIC=yes to restore the default (cherry picked from commit 5091324)
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).
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)