BPF Performance Tools

BPF Performance Tools

Brendan Gregg2019
Use BPF Tools to Optimize Performance, Fix Problems, and See Inside Running Systems BPF-based performance tools give you unprecedented visibility into systems and applications, so you can optimize performance, troubleshoot code, strengthen security, and reduce costs. BPF Performance Tools: Linux System and Application Observability is the definitive guide to using these tools for observability. Pioneering BPF expert Brendan Gregg presents more than 150 ready-to-run analysis and debugging tools, expert guidance on applying them, and step-by-step tutorials on developing your own. You'll learn how to analyze CPUs, memory, disks, file systems, networking, languages, applications, containers, hypervisors, security, and the kernel. Gregg guides you from basic to advanced tools, helping you generate deeper, more useful technical insights for improving virtually any Linux system or application. * Learn essential tracing concepts and both core BPF front-ends: BCC and bpftrace * Master 150+ powerful BPF tools, including dozens created just for this book, and available for download * Discover practical strategies, tips, and tricks for more effective analysis * Analyze compiled, JIT-compiled, and interpreted code in multiple languages: C, Java, bash shell, and more * Generate metrics, stack traces, and custom latency histograms * Use complementary tools when they offer quick, easy wins * Explore advanced tools built on BPF: PCP and Grafana for remote monitoring, eBPF Exporter, and kubectl-trace for tracing Kubernetes * Foreword by Alexei Starovoitov, creator of the new BPF BPF Performance Tools will be an indispensable resource for all administrators, developers, support staff, and other IT professionals working with any recent Linux distribution in any enterprise or cloud environment.
Sign up to use

Reviews

Photo of Julien Sobczak
Julien Sobczak@julien-sobczak
4 stars
Oct 22, 2022

Linux performance analysis made easier. eBPF is gaining more and more attention for good reasons. eBPF turns Linux into a "programmable" kernel, improving its observability, networking, and security. If you work closely with Linux systems, learning about eBPF is indispensable, and BPF Performance Tools is the best resource. This book is written by Brendan Gregg, one of the main contributors on this subject, and author of the excellent Systems Performance. The first part is an introduction to eBFP to understand its history and how it works under the hood. The second part is by far the largest one. It contains one or several chapters for every topic—CPUs, memory, filesystems, disk I/Os, networking, security, languages, applications, containers, and hypervisors. Each chapter starts with a gentle introduction, before introducing the traditional Linux commands and the BPF tools that complement them. As a software developer, I found the book easy to follow, even without a solid background in Linux programming. The explanations are concise, clear, and remarkably illustrated. The commands used in examples are well-chosen and the comments really help to understand their output. This book was invaluable during my last performance issues. Running commands to debug issues is easy. Knowing which command to run and understanding which statistics to read is far more challenging. This book will help you too.