Giter VIP home page Giter VIP logo

bpf-perf-workshop's Introduction

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-tools-book
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.

bpf-perf-workshop's People

Contributors

brendangregg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.