Using eBPF Off-CPU Sampling to See What Your DBs are Waiting For
summary
Demonstrates an eBPF-based profiler called xtop/xcapture that samples threads at ~20Hz and attributes wall-clock time to on-CPU vs off-CPU causes without changing database code, showing per-connection stacks for MySQL, Postgres and DuckDB. It creates an extended task state array, captures off-CPU user/kernel stacks and links weight events (Oracle example), surfaces surprises like ~300,671 sampled thread-events in a 5s run and fsync/iode_lock contention, and currently runs via BCC en route to libbpf; code is open source.
AI-written summary · about
chapters (5)
- 0:00Introduction and background
- 3:57Old tool demo with proc FS
- 10:19eBPF-based xtop tool demo
- 18:09How the eBPF tool works
- 19:59Future plans and conclusion
related talks
17mIdentifying On-/Off-CPU Bottlenecks Together with Blocked Samples
45mFast and Safe Production Monitoring of JVM Applications with BPF Magic
32meBPF: BPF kernel infrastructure
36mObservability and performance analysis with BPF
36mDeveloping Continuous eBPF Profiler to look Beneath the Kernel to Beyond the Clouds
27mLow-Overhead Tracing Using eBPF for Observability into Kubernetes Apps and Services
32mDeveloping eBPF profiler for polyglot cloud-native appli...
25mPerfect Match: Correlating Continuous Profiling with Distributed Tracing for Stronger Observability
