Run Fast! Catch Performance Regressions in eBPF with Rust
summary
Builds an XDP eBPF program in Rust using Aya and moves packet logic into eBPF maps to send Fizz/Buzz/FizzBuzz/Fibonacci messages to user space; a late regression appears when a per-packet Fibonacci check runs and adds significant latency (eBPF can add ~100 ms if abused). Benchmarks use Criterion for microtests and kernel BPF stats (proc fd info runtime_nsecs and run_count) for macro tests, serialize results to JSON with a custom harness, and integrate into CI with Bencher to fail builds on statistical regressions; bug fix hardcodes Fibonacci values under 256 (initial list missed 233) and restores performance.
AI-written summary · about
chapters (12)
- 0:00Introduction to eBPF
- 0:33Understanding eBPF and Rust
- 2:34Performance Regression Basics
- 3:54eBPF Tooling Ecosystem
- 5:20Basic eBPF Program Implementation
- 8:30Evolving the App with Maps
- 11:09Adding Complexity and Debugging
- 13:21Optimizing Performance
- 14:42Micro Benchmarking with Criterion
- 18:14Macro Benchmarking and Tracing
- 24:02Continuous Benchmarking in CI
- 27:34Conclusion and Q&A
related talks
46mTracing the Linux kernel with eBPF and Rust
35mEbpf with Rust: The Journey of a Package
36mRust in the Kernel (via eBPF)
32meBPF: The Next Power Tool of SREs
14mWriting Custom eBPF Programs for O11y: What You Need to Know
37mJust Buzz or Real Byte? eBPF in Cloud Native
43meBPF Superpowers for SRE
01h 07meBPF: Fueling New Flame Graphs & more
