BCC: Dynamic Tracing Tools for Linux
iovisor.github.io
iovisor.github.io
We're really hoping that this set of tools has only the minimal requirements, that being the kernel.
Since Clang/LLVM can be linked as a static or dynamic library, we only have a build-time dependency on those, and opt for the static library. The build scripts have steps to build clang+llvm from source if your distro doesn't include it. The binaries that we ship hide this and should (if we've done things right) only have a libc and few misc .so dependencies. A change under test even adds a fully static lua version.
On the kernel side, we don't conditionally compile anything based on kernel features, and instead try/fail at runtime. You can just upgrade your kernel and the tools will start to take advantage of the new features immediately.
So yes, BPF is becoming the standard and the future. It made it into the kernel (well, the enhancements needed for tracing did; BPF has been around for a long time as just a packet filter). In other words, BPF won. bcc is likely the future, but we'll see other front ends as well (eg, ply).
back end technologies: ftrace, kprobes, uprobes, tracepoints, BPF
front ends: ftrace, perf_events, bcc
ftrace is hard to categorize: it is a collection of both back end and front end capabilities (although the front end is /sys). Also, it's being renamed to just "trace".
For a long time, there seemed to be a conventional wisdom that Linux tracing was mediocre, because it doesn't have DTrace. Has Linux approached or passed the "caught up" point?
- technical capability: we should pass it this year. We'll be technical capable of solving pretty much the same issues and then some.
- ease of use for script developers: bcc is currently ~10x more verbose to program. ply is much easier, but that project is in its early stages. This won't matter that much for Netflix, since much of the time staff will use this from a GUI (eg, Vector). It also won't matter that much for people who use the many provided tools, like opensnoop, tcpconnect, ext4slower, etc. It matters most for whoever codes the GUI and those tools (eg, me).
- marketing, awareness, brand: Sun marketing, sales, trainers, and evangelists, did an awesome job - everyone knows about DTrace, even if they've never used it. In comparison, bcc/BPF (and many other Linux kernel technologies, like ftrace) have virtually zero marketing budget or professional marketing staff promoting them. Awareness will take the longest to catch up.
I also summarized the current state of bcc/BPF in http://www.brendangregg.com/blog/2016-03-28/linux-bpf-bcc-ro...
I understand how much effort is involved in writing / publishing.
Are you planning a Second edition of your "Systems Performance, Enterprise and the Cloud" text, especially in light of the pace of development in the Linux performance / profiling space?
Thank you for all your countless contributions.