• Stars
    star
    179
  • Rank 214,039 (Top 5 %)
  • Language
    C
  • Created about 5 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

BPF Performance Tools Workshop

This is a 90-minute workshop created by Brendan Gregg, and uses some exercises from the book BPF Performance Tools: Linux System and Application Observability. BPF enables a new class of custom, efficient, and production safe performance analysis tools. Historically BPF stood for Berkeley Packet Filter, but since it has become a general purpose execution environment it is now a technology name and no longer an acronym. BPF is part of the Linux kernel.

This workshop is composed of slides, exercises, discussion, and demos. This repository contains two of those four parts: the slides and exercises, the other two are only available in class.

Prerequisites

You can either:

  • SSH to a lab instance (see bit of paper), or,
  • Setup your own system with BCC & bpftrace. Sample instructions below.

System Setup

If you choose to setup your own system, here is a script for Ubuntu:

sudo apt-get update
sudo apt-get install sysstat bpfcc-tools bpftrace gcc
git clone https://github.com/brendangregg/bpf-perf-workshop
cd bpf-perf-workshop/src
make && cd ..

Just for reference, you can fetch these repos:

git clone https://github.com/iovisor/bcc
git clone https://github.com/iovisor/bpftrace

Checking your system works

Testing the opensnoop(8) tool from both BCC and bpftrace (Ubuntu package naming scheme: BCC tools end in -bpfcc, and bpftrace .bt):

$ sudo bash
# opensnoop-bpfcc
[...]
# opensnoop.bt
[...]

Those should produce output and not error. Ctrl-C to end each.

References

You may wish to open these in tabs. For labs 1-3 (BCC):

For labs 4-5 (bpftrace):

Labs

Copyright Brendan Gregg, 2019. All rights reserved.

More Repositories

1

FlameGraph

Stack trace visualizer
Perl
16,893
star
2

perf-tools

Performance analysis tools based on Linux perf_events (aka perf) and ftrace
Shell
9,533
star
3

bpf-perf-tools-book

Official repository for the BPF Performance Tools book
Python
1,621
star
4

HeatMap

Heat map generation tools
Perl
305
star
5

pmc-cloud-tools

PMC (Performance Monitoring Counter) tools for the cloud
Shell
233
star
6

Chaosreader

An any-snarf program that processes application protocols (HTTP/FTP/...) from tcpdump or snoop files and stores session and file data
216
star
7

dtrace-cloud-tools

Some DTrace tools written for the SmartOS/SmartDataCenter cloud (illumos-based)
D
202
star
8

wss

Working Set Size tools
C
200
star
9

systemtap-lwtools

SystemTap Lightweight Tools
182
star
10

msr-cloud-tools

MSR Cloud Tools
Shell
173
star
11

DTrace-book-scripts

Scripts from "DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X, and FreeBSD", by Brendan Gregg and Jim Mauro, Prentice Hall, 2011.
167
star
12

BPF-tools

Performance Tools using Linux eBPF
C
118
star
13

perf-labs

Performance analysis labs
C
89
star
14

DTrace-tools

DTrace tools for FreeBSD
DTrace
69
star
15

PerfModels

Performance Scalability Models
R
67
star
16

Misc

Misc
Shell
65
star
17

Dump2PNG

Visualize file data as a PNG
C
40
star
18

GuessingGame

Guessing game written in many programming languages
Batchfile
33
star
19

proc-profiler

Linux /proc/PID/stack profiler
Perl
32
star
20

bpf-typewriter

BPF noisy typewriter (bpftrace)
23
star
21

p1bench

Perturbation Benchmark
C
20
star
22

DTraceToolkit

A collection of useful, tested and documented DTrace scripts
16
star
23

FlameScope

coming soon
Perl
13
star
24

skid-testing

Processor PMC sample skid testing
C
7
star
25

wrmsrbench

WRMSR micro benchmark
C
7
star
26

Test

testing github
JavaScript
3
star
27

brendangregg.github.io

HTML
3
star