fix(client/pkg): ship 32MB UDP recv-buffer sysctl with the Linux client

The client asks the kernel for a 32 MB SO_RCVBUF, but the kernel silently clamps
it to net.core.rmem_max — whose default is far too small. A too-small recv buffer
is the dominant client-side wall above ~1 Gbps. Measured live (Fedora host -> two
clients, real 2.5G LAN, GSO off): a client capped at 4 MB rmem_max dropped 31.6%
of a 2 Gbps stream at the receiver, while a 32 MB client delivered the same
2 Gbps at 0.0% loss. The host already shipped this tuning; the client packages
didn't (the RPM's %post even referenced the host-only file), so a client-only
install streamed lossy at high bitrate.

Add scripts/99-punktfunk-client-net.conf (rmem/wmem = 32 MB, distinct filename so
host+client can coexist) and ship+apply it from both the .deb (build-client-deb.sh)
and the RPM client subpackage (install, %files client, %post client).

For reference the full ladder (punktfunk speed-test): 0% loss to 1.5 Gbps on a
4 MB client; 31.6% at 2 Gbps on 4 MB vs 0% at 2 Gbps on 32 MB. iperf3 put the raw
link at ~2.35 Gbps TCP / ~2.4 Gbps UDP, so the stack now tracks the wire given a
big enough recv buffer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-14 08:45:19 +00:00
parent 62613055c1
commit 658d6ce1b8
3 changed files with 25 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
# punktfunk client UDP socket-buffer tuning. The client asks the kernel for a 32 MB UDP receive
# buffer (SO_RCVBUF) so high-bitrate video bursts don't overflow it, but the kernel silently CLAMPS
# the request to net.core.rmem_max — whose default (~208 KB-4 MB) is far too small. A too-small recv
# buffer is the dominant client-side wall above ~1 Gbps: measured live, a 4 MB cap dropped 31.6% of a
# 2 Gbps stream at the receiver while a 32 MB cap delivered the same 2 Gbps at 0.0% loss. wmem covers
# the mic-uplink / input send side. systemd-sysctl applies this at boot; the postinst applies it now.
net.core.rmem_max = 33554432
net.core.wmem_max = 33554432