Skip to content

Conversation

eandersson
Copy link
Contributor

Enable TCP BBR congestion control to improve throughput and reduce latency for network traffic
https://en.wikipedia.org/wiki/TCP_congestion_control#TCP_BBR

@eandersson eandersson changed the title Enable TCP BBR Enable TCP BBR congestion control Aug 22, 2025
@brocaar
Copy link
Collaborator

brocaar commented Aug 25, 2025

Thanks, as this is not enabled by default in the OpenWrt configuration, I have doubts if we need to enable this if there is not a specific use-case. E.g. we are not dealing with devices that are sending lots of data. Could you further explain why this option should be enabled? E.g. was there an issue that you ran into without this option enabled?

@eandersson
Copy link
Contributor Author

I was mostly surprised that BBR isn’t available by default, given that it has been part of the Linux kernel since 4.9 and I use it mostly due to my gateway not always having the best network conditions. It unfortunately only helps with TCP and not UDP, but still useful in my opinion.

One area where BBR can make a difference is in poor WiFi or 4G conditions. Traditional congestion control (like CUBIC) interprets packet loss as congestion, which causes it to back off aggressively. On noisy links, however, packet loss often happens due to interference or variable signal quality rather than real congestion. This leads to reduced throughput even when the link could handle more.

Here’s a good overview for reference: TCP BBR – exploring TCP congestion control

@brocaar
Copy link
Collaborator

brocaar commented Aug 25, 2025

Thanks! But given that the gateway only sends very little data (Protobuf over MQTT), is using the default congestion protocol problematic? E.g. does it go in your case to unusable? Just trying to understand the full picture. Adding new stuff is easy, but removing it afterwards is harder. The non-RPi gateways have very little memory, thus the images need to be as small as possible.

As far as I understand, this PR makes the congestion algorithm available as a kernel module, however it does not enable its use. Is that correct?

@eandersson
Copy link
Contributor Author

Thanks! But given that the gateway only sends very little data (Protobuf over MQTT), is using the default congestion protocol problematic? E.g. does it go in your case to unusable? Just trying to understand the full picture. Adding new stuff is easy, but removing it afterwards is harder. The non-RPi gateways have very little memory, thus the images need to be as small as possible.

As far as I understand, this PR makes the congestion algorithm available as a kernel module, however it does not enable its use. Is that correct?

It looks like openwrt enables bbr by default when installed.

root@gateway:/etc/sysctl.d# cat 12-tcp-bbr.conf
# Do not edit, changes to this file will be lost on upgrades
# /etc/sysctl.conf can be used to customize sysctl settings

net.ipv4.tcp_congestion_control=bbr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants