Book description
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.
Table of contents
- Cover Page
- About This eBook
- Half Title Page
- Title Page
- Copyright Page
- Contents at a Glance
- Contents
- Foreword
- Preface
- Acknowledgments
- About the Author
-
Part I: Technologies
-
Chapter 1. Introduction
- 1.1 What Are BPF and eBPF?
- 1.2 What Are Tracing, Snooping, Sampling, Profiling, and Observability?
- 1.3 What Are BCC, bpftrace, and IO Visor?
- 1.4 A First Look at BCC: Quick Wins
- 1.5 BPF Tracing Visibility
- 1.6 Dynamic Instrumentation: kprobes and uprobes
- 1.7 Static Instrumentation: Tracepoints and USDT
- 1.8 A First Look at bpftrace: Tracing open()
- 1.9 Back to BCC: Tracing open()
- 1.10 Summary
- Chapter 2. Technology Background
- Chapter 3. Performance Analysis
- Chapter 4. BCC
-
Chapter 5. bpftrace
- 5.1 bpftrace Components
- 5.2 bpftrace Features
- 5.3 bpftrace Installation
- 5.4 bpftrace Tools
- 5.5 bpftrace One-Liners
- 5.6 bpftrace Documentation
- 5.7 bpftrace Programming
- 5.8 bpftrace Usage
- 5.9 bpftrace Probe Types
- 5.10 bpftrace Flow Control
- 5.11 bpftrace Operators
- 5.12 bpftrace Variables
- 5.13 bpftrace Functions
- 5.14 bpftrace Map Functions
- 5.15 bpftrace Future Work
- 5.16 bpftrace Internals
- 5.17 bpftrace Debugging
- 5.18 Summary
-
Chapter 1. Introduction
- Part II: Using BPF Tools
-
Part III: Additional Topics
- Chapter 17. Other BPF Performance Tools
-
Chapter 18. Tips, Tricks, and Common Problems
- 18.1 Typical Event Frequency and Overhead
- 18.2 Sample at 49 or 99 Hertz
- 18.3 Yellow Pigs and Gray Rats
- 18.4 Write Target Software
- 18.5 Learn Syscalls
- 18.6 Keep It Simple
- 18.7 Missing Events
- 18.8 Missing Stacks Traces
- 18.9 Missing Symbols (Function Names) When Printing
- 18.10 Missing Functions When Tracing
- 18.11 Feedback Loops
- 18.12 Dropped Events
- Part IV: Appendixes
- Glossary
- Bibliography
- Index
- Code Snippets
Product information
- Title: BPF Performance Tools
- Author(s):
- Release date: December 2019
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780136624523
You might also like
book
Istio in Action
Solve difficult service-to-service communication challenges around security, observability, routing, and resilience with an Istio-based service mesh. …
book
Systems Performance, 2nd Edition
covers concepts, strategy, tools, and tuning for operating systems and applications, using Linux-based operating systems as …
book
Building Microservices, 2nd Edition
As organizations shift from monolithic applications to smaller, self-contained microservices, distributed systems have become more fine-grained. …
book
Designing Data-Intensive Applications, 2nd Edition
Data is at the center of many challenges in system design today. Difficult issues such as …