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 -a options 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 β€” bptune extra plugin directory; defaults to /usr/local/lib64/bpftune . both /usr/lib64/bpftune and /usr/local/lib64/bpftune can be used to install plugin tuners; if an alternative to /usr/local/lib64/bpftune is wanted, it must be specified via library path. πŸ“‚
  • -r, --learning_rate β€” Specify learning rate; supported values range from
    • 0: tunables are changed by/within 1.0625 % of limit
    • 1: tunables are changed by/within 3.125 % of limit
    • 2: tunables are changed by/within 6.25 % of limit
    • 3: tunables are changed by/within 12.5 % of limit
    • 4: tunables are changed by/within 25 % of limit
    • so for example at rate 4, if we are within 25 % of a limit, the limit is increased by 25 %. default learning rate is 4. 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 include
    • help β€” show supported queries
    • summary β€” show summary of changes made by tuners
    • tuners β€” show loaded tuners and their state
    • tunables β€” show supported tunables for loaded tuners
    • jtunables β€” show supported tunables in json format
    • status β€” show current status of tunables
    • jstatus β€” show current status of tunables in json format
    • rollback β€” 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