Blame

fd8e6b Viraj Alankar 2025-06-10 17:59:07 1
# Improving video streaming over WAN
2
3
[BBRv3](https://github.com/google/bbr/tree/v3) vastly improves reliability of video streaming over a high latency link.
4
5
[CachyOS](https://cachyos.org/) is the only Linux distro that has this builtin to its kernel. It must be [enabled](https://github.com/CachyOS/linux-cachyos/issues/439) manually.
6
20efa0 Viraj Alankar 2025-06-10 18:04:25 7
[This ansible config](https://github.com/valankar/ansible) provides a way to set this up on new CachyOS and Debian machines. It includes a [kernel build for Debian 12](https://github.com/valankar/ansible/tree/master/kernel).
8
871c3a Viraj Alankar 2025-06-10 18:05:32 9
Some [sysctls](https://github.com/valankar/ansible/blob/master/cachyos/99-networking.conf) are needed to increase TCP buffer sizes. See also [this thread](https://groups.google.com/g/bbr-dev/c/Yj2_WCBtXpQ/m/S2976NUzEQAJ):
20efa0 Viraj Alankar 2025-06-10 18:04:25 10
11
```
12
# BBRv3
13
net.ipv4.tcp_congestion_control = bbr
14
net.core.default_qdisc = fq
15
# Needed for cloudflared quic:
16
# https://github.com/cloudflare/cloudflared/issues/1176
17
# It may also be needed for BBR:
18
# https://groups.google.com/g/bbr-dev/c/Yj2_WCBtXpQ/m/S2976NUzEQAJ
19
# Note: Setting _default settings affects non-IP sockets as well.
20
net.core.rmem_max=900000000
21
net.core.wmem_max=900000000
22
net.ipv4.tcp_wmem=4096 262144 900000000
23
net.ipv4.tcp_rmem=4096 540000 900000000
24
```
25
fd8e6b Viraj Alankar 2025-06-10 17:59:07 26
## iperf3 examples
27
28
### Without BBRv3 (default Debian 12 kernel)
29
30
```
31
[ ID] Interval Transfer Bitrate
32
[ 5] 0.00-1.00 sec 1.15 MBytes 9.67 Mbits/sec
33
[ 5] 1.00-2.00 sec 2.52 MBytes 21.1 Mbits/sec
34
[ 5] 2.00-3.00 sec 1.78 MBytes 15.0 Mbits/sec
35
[ 5] 3.00-4.00 sec 2.30 MBytes 19.3 Mbits/sec
36
[ 5] 4.00-5.00 sec 1.24 MBytes 10.4 Mbits/sec
37
[ 5] 5.00-6.00 sec 1.24 MBytes 10.4 Mbits/sec
38
[ 5] 6.00-7.00 sec 1.55 MBytes 13.0 Mbits/sec
39
[ 5] 7.00-8.00 sec 1.36 MBytes 11.4 Mbits/sec
40
[ 5] 8.00-9.00 sec 1.37 MBytes 11.5 Mbits/sec
41
[ 5] 9.00-10.00 sec 1.58 MBytes 13.3 Mbits/sec
42
- - - - - - - - - - - - - - - - - - - - - - - - -
43
[ ID] Interval Transfer Bitrate Retr
44
[ 5] 0.00-10.17 sec 19.1 MBytes 15.7 Mbits/sec 288 sender
45
[ 5] 0.00-10.00 sec 16.1 MBytes 13.5 Mbits/sec receiver
46
```
47
48
### With BBRv3
49
50
```
51
me@client:~$ iperf3 -c my.server.org -R
52
Reverse mode, remote host my.server.org is sending
53
[ ID] Interval Transfer Bitrate
54
[ 5] 0.00-1.00 sec 764 KBytes 6.26 Mbits/sec
55
[ 5] 1.00-2.00 sec 14.3 MBytes 120 Mbits/sec
56
[ 5] 2.00-3.00 sec 13.7 MBytes 115 Mbits/sec
57
[ 5] 3.00-4.00 sec 10.1 MBytes 85.0 Mbits/sec
58
[ 5] 4.00-5.00 sec 12.2 MBytes 103 Mbits/sec
59
[ 5] 5.00-6.00 sec 11.1 MBytes 93.0 Mbits/sec
60
[ 5] 6.00-7.00 sec 12.4 MBytes 104 Mbits/sec
61
[ 5] 7.00-8.00 sec 11.7 MBytes 98.1 Mbits/sec
62
[ 5] 8.00-9.00 sec 13.6 MBytes 114 Mbits/sec
63
[ 5] 9.00-10.00 sec 13.7 MBytes 115 Mbits/sec
64
- - - - - - - - - - - - - - - - - - - - - - - - -
65
[ ID] Interval Transfer Bitrate Retr
66
[ 5] 0.00-10.16 sec 117 MBytes 96.3 Mbits/sec 900 sender
67
[ 5] 0.00-10.00 sec 114 MBytes 95.3 Mbits/sec receiver
68
```