1
0
mirror of synced 2024-11-24 22:06:07 +03:00

Improve sysctl settings

- For enabling TCP BBR congestion control, add a check to make sure
  tcp_congestion_control exists.
This commit is contained in:
hwdsl2 2022-11-20 15:01:44 -06:00
parent fc16499d28
commit 651c404bf6
2 changed files with 4 additions and 2 deletions

View File

@ -578,7 +578,8 @@ net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 87380 16777216
EOF EOF
if modprobe -q tcp_bbr \ if modprobe -q tcp_bbr \
&& printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V; then && printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V \
&& [ -f /proc/sys/net/ipv4/tcp_congestion_control ]; then
cat >> /etc/sysctl.conf <<'EOF' cat >> /etc/sysctl.conf <<'EOF'
net.core.default_qdisc = fq net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr net.ipv4.tcp_congestion_control = bbr

View File

@ -559,7 +559,8 @@ net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 87380 16777216
EOF EOF
if modprobe -q tcp_bbr \ if modprobe -q tcp_bbr \
&& printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V; then && printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V \
&& [ -f /proc/sys/net/ipv4/tcp_congestion_control ]; then
cat >> /etc/sysctl.conf <<'EOF' cat >> /etc/sysctl.conf <<'EOF'
net.core.default_qdisc = fq net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr net.ipv4.tcp_congestion_control = bbr