Skip to content

Document Linux UDP receive buffer tuning for server operators#1150

Open
mcfnord wants to merge 2 commits into
jamulussoftware:next-releasefrom
mcfnord:buffer-tuning
Open

Document Linux UDP receive buffer tuning for server operators#1150
mcfnord wants to merge 2 commits into
jamulussoftware:next-releasefrom
mcfnord:buffer-tuning

Conversation

@mcfnord

@mcfnord mcfnord commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a short section to the Server Administration page documenting a Linux kernel tuning step that prevents silent UDP packet drops under load.

The problem

Linux's default UDP receive buffer is ~208 KB (net.core.rmem_default = 212992). When a Jamulus server is busy, this buffer fills and the kernel drops incoming UDP packets without any log entry or warning. The server and service appear healthy; the symptom is complete audio interruptions for connected clients that look like network packet loss.

Evidence from production

Measured on two public Jamulus servers before applying the fix:

Server Provider / arch Duration Kernel UDP drops
Server A DigitalOcean x86_64 6 days 9,103
Server B AWS aarch64, 2 CPUs 5 days 14,035

After increasing the buffer to 4 MB, drops fell to zero within seconds of restarting the service on both servers. Server B's audio interruptions resolved completely. The fix has since been applied and verified on a fleet of 16 servers across DigitalOcean, AWS, Oracle Cloud, Hetzner, and Linode — x86_64 and aarch64 — all clean.

The fix

Three shell commands, no downside, persists across reboots:

sudo sysctl -w net.core.rmem_max=4194304 net.core.rmem_default=4194304
printf 'net.core.rmem_max=4194304\nnet.core.rmem_default=4194304\n' | sudo tee /etc/sysctl.d/99-jamulus.conf
sudo systemctl restart jamulus-headless

Changes

  • wiki/en/Running-a-Server.md: new section "Increasing the UDP receive buffer (Linux)" added before the Troubleshooting link, with the fix commands and a drop-counter verification step.

This section is English-only in the source; translation pipeline will handle localisation as usual.

jrd and others added 2 commits June 23, 2026 17:42
Replace specific bandwidth numbers with clearer practical advice: discourages wireless connections and notes fiber works well.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Linux default UDP receive buffer (~208 KB) is too small for a Jamulus
server under load. The kernel silently drops packets when the buffer fills,
causing complete audio interruptions that are indistinguishable from network
problems. Measured on production servers: 9,103 drops in 6 days on one host,
14,035 drops in 5 days on another. Increasing to 4 MB resolved the issue.

Adds a new section to Running-a-Server.md with the three-command fix and
a drop-counter verification step.
@mcfnord

mcfnord commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

I don't know a lot about these buffers, but I deploy to very small Linux instances, and it wouldn't surprise me if they face resource starvation in the way described.

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.

1 participant