Using eBPF for Linux Performance Analyses
summary
Practical tour of eBPF shows which probes and tools deliver actionable signals: BCC tools and bpftrace attach dynamic probes (kernel verifier and JIT protect safety), trace CPUs, block I/O and file fsync latency, cache hit/miss rates, run‑queue latency, TCP retransmits and open/read traces, and a “poor man’s profiler” using 49 Hz sampling. Kernels ship eBPF since 2014 but need matching headers; Cloudflare benchmarks cite 100 ns per probe (simple) and ~300 ns (complex), ~10M probes/sec/core.
AI-written summary · about
chapters (20)
- 0:00Introduction to eBPF
- 1:31eBPF vs conventional instrumentation
- 5:23History and Linux implementation
- 7:56eBPF improvements in Linux
- 10:25eBPF environment in Linux
- 11:51eBPF tools and BCC
- 13:20eBPF availability challenges
- 15:08Poor man's profiler demo
- 16:56bcc-latency tool demo
- 19:06File system level tracing
- 20:31Cache hit rate statistics
- 21:59CPU run queue latency
- 23:22Process execution tracing
- 24:47TCP connection tracing
- 25:30TCP retransmits analysis
- 26:32DNS lookup performance
- 27:37BCC tool collection
- 27:59BPFtrace one-liners
- 29:04eBPF overhead considerations
- 30:11Q&A and resources
