Skip to content

feat: Use fq packet scheduler when BBR is enabled#338

Merged
ptr1337 merged 1 commit intomasterfrom
feat/use-fq-on-bbr
Nov 27, 2024
Merged

feat: Use fq packet scheduler when BBR is enabled#338
ptr1337 merged 1 commit intomasterfrom
feat/use-fq-on-bbr

Conversation

@1Naim
Copy link
Member

@1Naim 1Naim commented Nov 27, 2024

BBR relies on pacing that is currently only implemented on fq[1]. While this is not mandatory since [2], research[3][4][5][6] has shown that fq is still preferable to use, not only on BBR but also as a general packet scheduler on host systems. With that in mind, we can adopt using fq as the default globally in our config instead, but since this requires further consideration, let's just set this when BBR is enabled for now.

This is not set on the server kernel where using fq_codel seems to be more desirable.

[1] https://man7.org/linux/man-pages/man8/tc-fq.8.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=218af599fa635b107cfe10acf3249c4dfe5e4123
[3] https://research.cec.sc.edu/files/cyberinfra/files/BBR%20-%20Fundamentals%20and%20Updates%202023-08-29.pdf
[4] https://groups.google.com/g/bbr-dev/c/4jL4ropdOV8/m/zNQa-cv7AAAJ - See points 3 and last 2 sentences
[5] https://groups.google.com/g/bbr-dev/c/4jL4ropdOV8/m/0-bNH-KEBgAJ
[6] https://github.com/torvalds/linux/blob/master/net/ipv4/tcp_bbr.c#L55-L57

BBR relies on pacing that is currently only implemented on fq[1]. While this is not mandatory since [2],
research[3][4][5][6] has shown that fq is still preferable to use, not only on BBR but also as a general
packet scheduler on host systems. With that in mind, we can adopt using fq as the default globally in our config
instead, but since this requires further consideration, let's just set this when BBR is enabled for now.

This is not set on the server kernel where using fq_codel seems to be more desirable.

[1] https://man7.org/linux/man-pages/man8/tc-fq.8.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=218af599fa635b107cfe10acf3249c4dfe5e4123
[3] https://research.cec.sc.edu/files/cyberinfra/files/BBR%20-%20Fundamentals%20and%20Updates%202023-08-29.pdf
[4] https://groups.google.com/g/bbr-dev/c/4jL4ropdOV8/m/zNQa-cv7AAAJ - See points 3 and last 2 sentences
[5] https://groups.google.com/g/bbr-dev/c/4jL4ropdOV8/m/0-bNH-KEBgAJ
[6] https://github.com/torvalds/linux/blob/master/net/ipv4/tcp_bbr.c#L55-L57

Signed-off-by: Eric Naim <dnaim@cachyos.org>
@1Naim 1Naim requested review from ptr1337 and ventureoo November 27, 2024 10:10
Copy link
Member

@ventureoo ventureoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Honestly, we already had this on by @Shendisx suggestion for BBR2 (#112), but as I see we lost it when we moved to BBR3 patch.

Copy link
Member

@sirlucjan sirlucjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ptr1337 ptr1337 merged commit 71a2bf4 into master Nov 27, 2024
@ptr1337 ptr1337 deleted the feat/use-fq-on-bbr branch November 27, 2024 12:18
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.

4 participants