BPFTUNE-NET-BUFFER(8)
π NAME π
BPFTUNE-NET-BUFFER β bestie, it's the networking buffer bpftune plugin, and its whole job is managing net core buffers. That's it, that's the gig. π
β¨ DESCRIPTION β¨
Okay so picture this: a backlog queue exists to buffer incoming traffic, and its length is controlled by net.core.netdev_max_backlog. On fast connections (10Gb/s or higher, we're talking zoom zoom ποΈ) the default backlog length of 1024 can lowkey be not enough. So here's the move: the backlog length gets increased whenever 1/32 of current backlog size in the last minute is dropped (and drops happen when the backlog limit gets reached, sad π).
Also, real talk β backlog drops can avoid small flows π₯Ί, and the tunable net.core.flow_limit_cpu_bitmap can be used to set this on a per-cpu basis. When we see sufficient drops on a CPU, the appropriate bit gets set in the CPU bitmask to prioritize small flows for drop avoidance. She's protective like that π«Ά.
Now, when NAPI polls to handle multiple packets, the number of packets is limited by net.core.netdev_budget while the time is limited by net.core.netdev_budget_usecs. If we hit the limit of number of packets processed without using the usecs budget, the time_squeezed softnet stat gets bumped β¬οΈ. And if we see increases in time_squeezed, we bump netdev_budget / netdev_budget_usecs.
BUT β and this is the plot twist π β we want to limit such increases if they lead to longer task scheduling wait times. So we monitor the ratio of time tasks spend waiting versus running across all processors, and if we see correlations between increases in netdev budget and wait/run ratio increases, netdev budget gets tuned down. Balance, bestie, it's giving main character energy π.
πΈ Tunables πΈ
net.core.netdev_max_backlogβ maximum per-cpu backlog queue length; default1024.net.core.flow_limit_cpu_bitmapβ avoid drops for small flows on a per-cpu basis; default0.net.core.netdev_budgetβ maximum number of packets processed in a NAPI cyclenet.core.netdev_budget_usecsβ maximum amount of time in microseconds for a NAPI cycle
π SEE ALSO π
And that's the whole page, babe β it's BPFTUNE-NET-BUFFER(8), living in the System Manager's Manual, officially part of the bpftune lineup. Read it, love it, tune those buffers responsibly. Obsessed, honestly πβ¨ππ¦
π¦ where this page comes from
- nixos 26.05: bpftune 0.4-2
- ubuntu stonking: bpftune 0.4.2.10.g4712347-1 Β· GPL-2.0 WITH Linux-syscall-note exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms