From af843da1a0f8c6a6974c438bb3b4e8363464694f Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Thu, 21 Nov 2024 16:12:24 -0600 Subject: [PATCH] feat: script to disable bbr --- Makefile | 16 ++++++++++++++++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d946b5af93..a6c641befb 100644 --- a/Makefile +++ b/Makefile @@ -274,6 +274,22 @@ enable-bbr: fi .PHONY: enable-bbr +## disable-bbr: Disable BBR congestion control algorithm and revert to default. +disable-bbr: + @echo "Disabling BBR and reverting to default congestion control algorithm..." + @if [ "$$(sysctl net.ipv4.tcp_congestion_control | awk '{print $$3}')" = "bbr" ]; then \ + echo "BBR is currently enabled. Reverting to Cubic..."; \ + sudo sed -i '/^net.core.default_qdisc=fq/d' /etc/sysctl.conf; \ + sudo sed -i '/^net.ipv4.tcp_congestion_control=bbr/d' /etc/sysctl.conf; \ + sudo modprobe -r tcp_bbr; \ + echo "net.ipv4.tcp_congestion_control=cubic" | sudo tee -a /etc/sysctl.conf; \ + sudo sysctl -p; \ + echo "BBR has been disabled, and Cubic is now the default congestion control algorithm."; \ + else \ + echo "BBR is not enabled. No changes made."; \ + fi +.PHONY: disable-bbr + ## enable-mptcp: Enable mptcp over multiple ports (not interfaces). Only works on Linux Kernel 5.6 and above. enable-mptcp: @echo "Configuring system to use mptcp..." diff --git a/go.mod b/go.mod index 88ae9f1297..b7a77d1a16 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.23.1 require ( cosmossdk.io/errors v1.0.1 - cosmossdk.io/math v1.3.0 + cosmossdk.io/math v1.4.0 github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 github.com/celestiaorg/go-square v1.1.1 github.com/celestiaorg/go-square/v2 v2.0.0 diff --git a/go.sum b/go.sum index f3ad437e11..eb3a044c6b 100644 --- a/go.sum +++ b/go.sum @@ -188,8 +188,8 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= -cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=