BPFTUNE(8)
okay so bestie, sit down, hydrate, because we're about to talk about bpftune β that's BPFTUNE(8), from the System Manager's Manual, and she is that girl. auto-tuning your Linux kernel parameters via BPF?? in this economy?? yes. β¨
π NAME π
BPFTUNE β the tool for auto-tuning of Linux kernel parameters via BPF. periodt. π
πΈ SYNOPSIS πΈ
bpftune [OPTIONS]
OPTIONS := { { -V | --version } | { -h | --help } | { [-s | --stderr
} | { [-c | --cgroup] cgroup} | { [-l | --libdir ] libdir} | [{ -d |
--debug }] } { [-r | --learning_rate ] learning_rate} { [-R |
--rollback ]} { [-S | --support ]} { [-p | --port ] port} { [-q |
--query] query}
π DESCRIPTION π
okay so here's the vibe: bpftune ships a whole set of "tuners" β for sysctl parameters, congestion control algorithms, etc. β and their whole job is to optimize performance and stop your system from imposing unnecessary limits on tunables. no cap. π₯
ngl there's a permissions requirement though: bpftune needs CAP_BPF and CAP_TRACING capabilities, or CAP_SYS_ADMIN on older systemes. it's run via a systemd service, but bestie it can also be run standalone if required. π«Ά
want to know if your system even supports the BPF features bpftune needs? run bpftune -S. that's the vibe check right there.
so basic bptune support requires BPF ring buffer, BPF hashmap, and BPF sock ops and k[ret]probe support. on more modern systems, BPF tracing programs and BPF iterators are used instead. individual tuners support legacy mode operation where possible. and for per-network-namespace tuning? you need netns cookie support β without that, only global tuning is supported. tragic but true. π
β¨ OPTIONS β¨
-h,--helpβ Show help information π-V,--versionβ Show version. β¨-d,--debugβ Show debug output. π-a,--allowβ Allow tuner only, e.g.foo.so. multiple-aoptions can be supplied to allow specific tuners. used for testing. π§ͺ-c,--cgroupβ Filter events for cgroup. π«§-D,--daemonβ Run in daemon mode. π-s,--stderrβ Log to standard error instead of syslog. π’-S,--supportβ Scan system to see what level of bpftune support is present. π-l,--libdirβbptuneextra plugin directory; defaults to/usr/local/lib64/bpftune. both/usr/lib64/bpftuneand/usr/local/lib64/bpftunecan be used to install plugin tuners; if an alternative to/usr/local/lib64/bpftuneis wanted, it must be specified via library path. π-r,--learning_rateβ Specify learning rate; supported values range from0: tunables are changed by/within1.0625% of limit1: tunables are changed by/within3.125% of limit2: tunables are changed by/within6.25% of limit3: tunables are changed by/within12.5% of limit4: tunables are changed by/within25% of limit- so for example at rate
4, if we are within25% of a limit, the limit is increased by25%. default learning rate is4. lower values are more conservative as they change only when closer to limits, but may require more frequent changes as a result. π§
-R,--rollbackβ Roll back sysctl settings on exit; this allows us to explore tunable updates bpftune makes without making long-term changes to the system. on exit, bpftune summarizes the changes made and rolls back to the sysctl values that were set prior to bpftune running. β©οΈ-p,--portβ TCP port to listen on for queries. if not specified, use an ephemeral localhost port. πͺ-q,--queryβ Query bpftune. supported queries includehelpβ show supported queriessummaryβ show summary of changes made by tunerstunersβ show loaded tuners and their statetunablesβ show supported tunables for loaded tunersjtunablesβ show supported tunables in json formatstatusβ show current status of tunablesjstatusβ show current status of tunables in json formatrollbackβ show changes needed to roll back bpftune changes
π¦ SEE ALSO π¦
bpf(2), bpftune(8), π
fr fr that's the whole page β nothing skipped, nothing invented, all facts intact and all flags accounted for. if you skipped the boring-looking bits, bestie, go back, the tunables are counting on you. π
and that's a wrap on BPFTUNE(8) from the System Manager's Manual, page tag BPFTUNE(8) β if you're reading a version of this with a date stamped on it, that's the one, and she ate. πβ¨π«Ά
π¦ 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