Interview Prep/Linux/Performance & the USE Method

What are eBPF tools and why are they valuable in production?

AdvancedProductionPerformance & the USE Method
Answer

eBPF runs verified, sandboxed programs in the kernel with low overhead, so you can trace production safely. bcc and bpftrace tools:

sudo execsnoop-bpfcc            # every new process (short-lived ones top misses)
sudo opensnoop-bpfcc -p <pid>   # files opened
sudo biolatency-bpfcc           # disk I/O latency histogram
sudo tcpretrans-bpfcc           # TCP retransmits with addresses
sudo runqlat-bpfcc              # CPU scheduler queue latency
sudo bpftrace -e 'tracepoint:syscalls:sys_enter_openat { @[comm] = count(); }'

Tool names have a -bpfcc suffix on Debian/Ubuntu.

All Linux questions Roadmap: Linux

More on Performance & the USE Method