BPFTUNE-UDP-BUFFER(8)

πŸ“¦
version 0.4.2.10.g4712347 Β· 3 versions
, in nixos 26.05, ubuntu stonking

✨ NAME ✨

bpftune-udp-buffer β€” it's the bpftune plugin for UDP, and its whole lil job is keeping your UDP buffer sizes and memory limits from ruining the vibe πŸ’…


πŸ’– DESCRIPTION πŸ’–

okay so bestie, listen. For UDP β€” literally just like TCP β€” there's a triple of min, pressure, max that represents the UDP memory limits, and it lives right here:

net.ipv4.udp_mem

If a receive fails with -ENOBUFS, that's the signal that we're hitting those memory limits. So we adaptively bump up pressure and max to make sure memory exhaustion does not occur β€” as long as we don't get anywhere near actual real memory exhaustion. πŸ‘‘

But! As memory exhaustion gets approached and we can't increase the overall memory limits anymore, we instead reduce net.core.rmem* values to limit socket memory overheads. Gotta do what you gotta do. 🫢

Now for the UDP receive buffer memory: if a socket is experiencing receive buffer drops within range of the rmem_max_value, we bump net.core.rmem_max. Similarly, we bump rmem_default if sockets are within range of it and they don't have a locked value (locked meaning set via setsockopt). no cap πŸ’…

πŸŽ€ Tunables πŸŽ€

  • net.ipv4.udp_mem β€” the min, pressure, max UDP memory, the whole trio ✨
  • net.core.rmem_max β€” the max rcvbuf size you can specify via setsockopt()
  • net.core.rmem_default β€” the default rcvbuf size for when none was set πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

bpf(2), bpftune(8)


and that's the whole page, bestie β€” this one's from the System Manager's Manual, BPFTUNE-UDP-BUFFER(8), and yeah the footer's just the name again, iconic minimalism honestly πŸ’œπŸ§š

πŸ“¦ where this page comes from