Skip to content

Commit

Permalink
docs: add documentation to enabling BBR (#3812)
Browse files Browse the repository at this point in the history
Co-authored-by: Evan Forbes <[email protected]>
Co-authored-by: Rootul P <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Aug 22, 2024
1 parent fb79af5 commit 9ab70ff
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,18 @@ prebuilt-binary:
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
release --clean
.PHONY: prebuilt-binary

## enable-bbr: Enable BBR congestion control algorithm. Only works on Linux.
enable-bbr:
@echo "Configuring system to use BBR..."
@if [ "$(sysctl net.ipv4.tcp_congestion_control | awk '{print $3}')" != "bbr" ]; then \
echo "BBR is not enabled. Configuring BBR..."; \
sudo modprobe tcp_bbr; \
echo "net.core.default_qdisc=fq" | sudo tee -a /etc/sysctl.conf; \
echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee -a /etc/sysctl.conf; \
sudo sysctl -p; \
echo "BBR has been enabled."; \
else \
echo "BBR is already enabled."; \
fi
.PHONY: enable-bbr
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,22 @@ See <https://docs.celestia.org/nodes/celestia-app> for more information.
## Usage
First, make sure that the [BBR](https://www.ietf.org/archive/id/draft-cardwell-iccrg-bbr-congestion-control-01.html) ("Bottleneck Bandwidth and Round-trip propagation time") congestion control algorithm is enabled in the
system's kernel. The result should contain `bbr`:

```sh
sysctl net.ipv4.tcp_congestion_control
```

If not, enable it on Linux by calling the `make use-bbr` or by running:

```sh
sudo modprobe tcp_bbr
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
sudo sysctl -p
```

```sh
# Print help
celestia-appd --help
Expand Down

0 comments on commit 9ab70ff

Please sign in to comment.