How to Enable TCP BBR to Improve Network Speed on Linux

In the quest for optimal server performance, particularly under network congestion, TCP BBR (Bottleneck Bandwidth and Round-trip propagation time) has emerged as a game-changer. Developed by Google, TCP BBR is a congestion control algorithm that significantly improves network throughput and speed. For servers operating on Linux, enabling TCP BBR can lead to smoother and faster data transfer rates. This detailed tutorial will guide you through the process of enabling TCP BBR on your Linux server.

Prerequisites

Before proceeding, ensure you have:

  • A Linux server running kernel version 4.9 or higher. TCP BBR support began from kernel version 4.9 onwards.
  • Root or sudo privileges on the server.
  • Basic knowledge of navigating Linux command line interface.

Step 1: Checking Kernel Version

Begin by checking if your server’s kernel supports TCP BBR by retrieving the kernel version. You can do this by running:

uname -r
Checking Kernel Version

You’re good to go if the kernel version is 4.9 or higher. If not, consider upgrading your kernel to a supporting version.

Step 2: Enabling TCP BBR

Enabling TCP BBR involves modifying system configurations. Here’s how to enable TCP BBR on your Linux server:

  1. Open sysctl configuration file: You need to modify the sysctl configuration. Open the file using your preferred text editor:
   sudo nano /etc/sysctl.conf
  1. Add TCP BBR configuration: At the end of the file, add the following lines:
   net.core.default_qdisc=fq
   net.ipv4.tcp_congestion_control=bbr
Add TCP BBR configuration

These lines do two things: set the default queuing discipline to fq (Fair Queuing), which is required for BBR to work correctly and specify bbr as the congestion control algorithm.

  1. Save and exit: To save the changes and close the editor, press CTRL+X, followed by Y, and Enter to confirm.

Step 3: Applying the changes

To make the changes effective, reload the system configuration:

sudo sysctl -p
Applying the BBR changes

This command will apply the changes made in the sysctl.conf file without requiring a reboot.

Step 4: Verifying TCP BBR is Enabled

After enabling TCP BBR, verify that it’s actively set as the congestion control algorithm with:

sysctl net.ipv4.tcp_congestion_control

The output should be:

net.ipv4.tcp_congestion_control = bbr
Verifying TCP BBR is Enabled

This confirms that TCP BBR is enabled and operating.

Conclusion

With TCP BBR enabled on your Linux server, you should experience an improvement in network performance, especially under conditions of high traffic and congestion. By optimizing data transfer processes, BBR ensures more efficient and reliable server performance.

Remember, while TCP BBR can provide significant benefits, always monitor your system’s performance. Further tuning might be needed to achieve optimal results depending on your specific network and traffic conditions.

Recent Articles

Related Stories

Stay on op - Ge the daily news in your inbox