Specify the BBR Congestion Control Algorithm for each connection

596 views
Skip to first unread message

Dhvit Mehta

unread,
Dec 11, 2021, 1:14:20 PM12/11/21
to BBR Development

I want to know if I can allow only a few TCP connections to use BBR, I want to run Cubic or any other algorithm for the other connections

As far as I know once BBR is enabled using the systctl method it will be used for all TCP connections on the sender side

Ayush Mishra

unread,
Dec 11, 2021, 1:25:27 PM12/11/21
to Dhvit Mehta, BBR Development
Hey Dhvit,

You can select which congestion control algorithm you want to use for a connection using the socket options. If you're planning to run experiments using iperf, for example, you can set the congestion control algorithm of an iperf flow using the -Z option for iperf, and -C for iperf3. Sysctl sets the default congestion control algorithm - it will be overridden by whatever you set with iperf.

Example:
iperf3 -s -p 1000 -C bbr
iperf -s -p 1000 -Z bbr

~Ayush

On Sun, Dec 12, 2021 at 2:14 AM Dhvit Mehta <icm20...@iiita.ac.in> wrote:

I want to know if I can allow only a few TCP connections to use BBR, I want to run Cubic or any other algorithm for the other connections

As far as I know once BBR is enabled using the systctl method it will be used for all TCP connections on the sender side

--
You received this message because you are subscribed to the Google Groups "BBR Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbr-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbr-dev/abf9f584-d57a-4aca-a2e1-6c328a5e4b8fn%40googlegroups.com.

Neal Cardwell

unread,
Dec 11, 2021, 2:57:55 PM12/11/21
to Dhvit Mehta, BBR Development
You can use a BPF program to do that sort of thing. Here's an example BPF program to set the congestion control algorithm based on the port number and IP address range:
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/samples/bpf/tcp_cong_kern.c

neal


On Sat, Dec 11, 2021 at 1:14 PM Dhvit Mehta <icm20...@iiita.ac.in> wrote:

I want to know if I can allow only a few TCP connections to use BBR, I want to run Cubic or any other algorithm for the other connections

As far as I know once BBR is enabled using the systctl method it will be used for all TCP connections on the sender side

Reply all
Reply to author
Forward
0 new messages