Broadcast Fixes // StreamRelay Lab
Linux sysctl TCP BBR & UDP Socket Tuning for 10 Gbps Fan-Out
Default Linux kernel TCP cubic settings and 212 KB UDP receive buffers throttle long-distance HLS players and drop SRT/WebRTC packets under 2-8 Gbps fan-out.
Measured MediaMTX & FFmpeg Telemetry
Switching to Bottleneck Bandwidth and RTT (BBR) with fq queueing discipline sustains high single-stream throughput across trans-oceanic viewers, while 25 MB UDP buffers stop kernel ring drops.
| Subsystem / Signal | Measured Target | Operational Impact |
|---|---|---|
| Congestion Control | bbr + fq qdisc | Up to 2.5x higher single-viewer HLS burst |
| UDP rmem_max / wmem_max | 26,214,400 bytes (25 MB) | Protects SRT :8890 & WHEP :8189 |
| Listen Backlog (somaxconn) | 65,535 | Absorbs sudden viewer join spikes |
Step-by-Step Triage & Config Remediation
- Create /etc/sysctl.d/99-streamrelay.conf: Apply BBR, fq, 25 MB socket buffers, and 65,535 listen backlog.
- Reload sysctl parameters: Run sysctl --system and verify tcp_congestion_control outputs bbr.
- Confirm NIC ring buffers: On dedicated VDS nodes, inspect ethtool -g eth0 if available.
# /etc/sysctl.d/99-streamrelay.conf net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr net.core.rmem_max = 26214400 net.core.wmem_max = 26214400 net.core.somaxconn = 65535 net.ipv4.tcp_max_syn_backlog = 8192
Diagnostic FAQ
Does TCP BBR help WebRTC or SRT?
BBR accelerates TCP-based RTMP ingest and LL-HLS HTTP/2 egress, while rmem_max/wmem_max protect UDP-based SRT and WebRTC.
Is BBR supported on UltaHost and InterServer KVM kernels?
Yes, modern Ubuntu 22.04/24.04 and Debian 12 KVM/VDS kernels include tcp_bbr out of the box.