Skip to content

Commit

Permalink
feat: Use fq packet scheduler when BBR is enabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
1Naim authored and ptr1337 committed Nov 27, 2024
1 parent cd48cf5 commit 71a2bf4
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 9 deletions.
6 changes: 5 additions & 1 deletion linux-cachyos-autofdo/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select THP
Expand Down
6 changes: 5 additions & 1 deletion linux-cachyos-bmq/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select THP
Expand Down
6 changes: 5 additions & 1 deletion linux-cachyos-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select THP
Expand Down
6 changes: 5 additions & 1 deletion linux-cachyos-deckify/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select THP
Expand Down
6 changes: 5 additions & 1 deletion linux-cachyos-eevdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select THP
Expand Down
6 changes: 5 additions & 1 deletion linux-cachyos-hardened/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select THP
Expand Down
6 changes: 5 additions & 1 deletion linux-cachyos-lts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select LRU config
Expand Down
6 changes: 5 additions & 1 deletion linux-cachyos-rt-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select THP
Expand Down
6 changes: 5 additions & 1 deletion linux-cachyos/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,11 @@ prepare() {
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
--set-str DEFAULT_TCP_CONG bbr \
-m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d CONFIG_DEFAULT_FQ_CODEL \
-e CONFIG_DEFAULT_FQ
fi

### Select THP
Expand Down

0 comments on commit 71a2bf4

Please sign in to comment.