swizzin icon indicating copy to clipboard operation
swizzin copied to clipboard

Setup: Add BBR congestion control configuration

Open stickz opened this issue 2 years ago • 4 comments

This commit adds a feature to enable the BBR congestion control algorithm. This increases throughput of TCP connections thanks to clever engineering by Google.

stickz avatar Apr 23 '23 03:04 stickz

This will break unattended installation. Needs to have a switch that can be specified in the env file at minimum.

Some vendors that use our script may use custom kernels, so you may want to check the current congestion control algorithm first, then list the available congestion control algorithms via sysctl instead, enabling only if both those requirements are satisfied.

brettpetch avatar Apr 23 '23 11:04 brettpetch

@brettpetch This pull request is ready for review again. I tested it on Ubuntu 22.04 LTS on ARM.

  • Added --enablebbr command line option and updated readme.
  • Added BBR_CONGESTION_CONTROL variable for env file.

The solution I used for unknowledgeable users is to check if they are running a generic Linux Kernel. An advanced user can override this feature by enabling it through the command line or env file. The kernel module is not loaded until we enable it, so we can't easily check if the feature is supported. But we do know that it's enabled by default and all generic kernel support it.

Unattended setups or custom kernels must be enabled manually. It will only prompt the user if the Linux Kernel is generic.

stickz avatar Apr 23 '23 14:04 stickz

Alright, I improved the script to check if the Linux Kernel supports BBR and FQ. It should be pretty robust now.

stickz avatar Apr 23 '23 19:04 stickz

Feature is tested on Ubuntu 22.04LTS ARM64. It's perfected now to use 55-swizzin.conf to override 50-default.conf. This is required to ensure BBR Congestion Control has the proper Fair Queue Scheduler successfully enabled to avoid packet loss.

stickz avatar Apr 24 '23 01:04 stickz