SlideShare a Scribd company logo
@fntlnz
eBPF Powered
Kubernetes Performance Analysis
@fntlnz
eBPF (extended BPF)
Extended Berkeley Packet Filter
© 2018 InfluxData. All rights reserved.3
BPF is a Tracing Framework*
Used to access kernel trace backend instrumentation tools
*Actually, it’s not just that. And there’s also XDP.
© 2018 InfluxData. All rights reserved.4
Static tracepoints
sched:
task:
signal:
timer:
workqueue:
irq:
kvm:
tcp:
@fntlnz
© 2018 InfluxData. All rights reserved.5
Dynamic trace functionalities
uprobes kprobes
XDP
@fntlnz
© 2018 InfluxData. All rights reserved.6
Aggregate events at kernel side and
deal with just a few events instead of
thousands of them
@fntlnz
© 2018 InfluxData. All rights reserved.7
eBPF program lifecycle
Kernel space User space
User program
eBPF bytecode
Static verifier
BPF
BPF_MAP_* Results
(bpf_lookup_elem)
uprobes
kprobes
tracepoints
BPF_PROG_LOAD
see man 2 bpf
The mustache parrot warns!
eBPF programs can’t be turing complete!
XDP
socketfilter
@fntlnz
In today’s world
© 2018 InfluxData. All rights reserved.9
In today’s world: tcpdump
-d stands for: Dump the compiled packet-matching code in a human readable form to standard output and stop.
Documentation about the instruction set: https://www.kernel.org/doc/Documentation/networking/filter.txt
Is it an ethernet IP IPv4 packet?
Is src (x+14) on port 80 (0x50)?
Is dst (x+16) on port 80 (0x50)?
@fntlnz
In today’s world: seccomp
© 2018 InfluxData. All rights reserved.11
11
@fntlnz
More practical examples?
¨ Trace file opens by filename
¨ Trace queries done against a database, like InfluxDB or MySQL
¨ Trace TCP retransmissions
¨ Trace all commands done in a bash shell
¨ Trace block device I/O latency over time
¨ JVM events
¨ Go Runtime Events
¨ Firewalls, packet rewriting, dropping etc..
@fntlnz
High-level APIs are there!
© 2018 InfluxData. All rights reserved.13
13
@fntlnz
iovisor/gobpf
© 2018 InfluxData. All rights reserved.14
14
@fntlnz
iovisor/bpftrace
Program from file
Inline programs
© 2018 InfluxData. All rights reserved.15
15
@fntlnz
bpftrace probe types
@fntlnz
What about Kubernetes?
© 2018 InfluxData. All rights reserved.17
17
@fntlnz
github.com/fntlnz/kubectl-trace
The kubectl trace plugin Your bpftrace program
The node where to run it in your cluster
Attach the terminal to the program’s TTY
© 2018 InfluxData. All rights reserved.18
18
@fntlnz
github.com/fntlnz/kubectl-trace
Run program from file
Ctrl-C tells the program to
Plot the results using hist()
The output histogram
© 2018 InfluxData. All rights reserved.19
19
@fntlnz
kubectl trace and visidata!
@fntlnz
© 2018 InfluxData. All rights reserved.21
Any BPF Books to recommend ?
David and Jessie are writing one!!
© 2018 InfluxData. All rights reserved.22
References
1. https://www.iovisor.org/
2. https://github.com/cilium/cilium
3. https://github.com/iovisor/gobpf
4. https://landlock.io/
5. https://github.com/iovisor/bpftrace
6. https://github.com/iovisor/bpf-docs
7. https://medium.com/@fntlnz/load-xdp-programs-using-the-ip-iproute2-command-502043898263
8. https://www.youtube.com/watch?v=JRFNIKUROPE
9. https://cilium.readthedocs.io/en/latest/bpf/
1. iovisor BCC
2. Cilium: HTTP, gRPC, and Kafka Aware Security and Networking for Containers with BPF and XDP
3. iovisor/gobpf - To load eBPF programs using Go
4. Landlock LSM
5. iovisor bpftrace
6. iovisor BPF docs
7. Blog post on how to load xdp programs using iproute2
8. BPF Tracing Talk from Brendan Gregg
9. Cilium documentation for BPF
@fntlnz
Thank you!lorenzo@influxdata.com
twitter.com/fntlnz
github.com/fntlnz
If you’re that kind of person can find my pgp key here:
https://fntlnz.wtf/downloads/pubkey-B2400EE4.asc

More Related Content

PDF
Intro to Kapacitor for Alerting and Anomaly Detection
PDF
InfluxDB & Kubernetes
PDF
OPTIMIZING THE TICK STACK
PPTX
Kapacitor - Real Time Data Processing Engine
PDF
Virtual training Intro to InfluxDB & Telegraf
PDF
Write your own telegraf plugin
PDF
Finding OOMS in Legacy Systems with the Syslog Telegraf Plugin
PDF
How to Build a Telegraf Plugin by Noah Crowley
Intro to Kapacitor for Alerting and Anomaly Detection
InfluxDB & Kubernetes
OPTIMIZING THE TICK STACK
Kapacitor - Real Time Data Processing Engine
Virtual training Intro to InfluxDB & Telegraf
Write your own telegraf plugin
Finding OOMS in Legacy Systems with the Syslog Telegraf Plugin
How to Build a Telegraf Plugin by Noah Crowley

What's hot (20)

PPTX
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
PDF
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
PDF
Getting Ready to Move to InfluxDB 2.0 | Tim Hall | InfluxData
PDF
Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...
PDF
Flink Forward Berlin 2017: Roberto Bentivoglio, Saverio Veltri - NSDB (Natura...
PPTX
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
PDF
The Telegraf Toolbelt | David McKay | InfluxData
PDF
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
PPTX
Extending Flux - Writing Your Own Functions by Adam Anthony
PDF
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
PDF
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
PDF
Flink Forward San Francisco 2019: Massive Scale Data Processing at Netflix us...
PPTX
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
PDF
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
PPTX
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
PPTX
Influx data basic
PDF
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
PDF
Flink Forward Berlin 2017: Andreas Kunft - Efficiently executing R Dataframes...
PDF
Best Practices for Scaling an InfluxEnterprise Cluster
PDF
Post-K: Building the Arm HPC Ecosystem
Building Modern Data Pipelines for Time Series Data on GCP with InfluxData by...
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
Getting Ready to Move to InfluxDB 2.0 | Tim Hall | InfluxData
Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...
Flink Forward Berlin 2017: Roberto Bentivoglio, Saverio Veltri - NSDB (Natura...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
The Telegraf Toolbelt | David McKay | InfluxData
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Extending Flux - Writing Your Own Functions by Adam Anthony
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
Flink Forward San Francisco 2019: Massive Scale Data Processing at Netflix us...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
Influx data basic
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
Flink Forward Berlin 2017: Andreas Kunft - Efficiently executing R Dataframes...
Best Practices for Scaling an InfluxEnterprise Cluster
Post-K: Building the Arm HPC Ecosystem
Ad

Similar to eBPF Powered Distributed Kubernetes Performance Analysis - Lorenzo Fontana, InfluxData (20)

PDF
DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...
PDF
Introduction of eBPF - 時下最夯的Linux Technology
PDF
UM2019 Extended BPF: A New Type of Software
PDF
Prometheus as exposition format for eBPF programs running on Kubernetes
PDF
Efficient System Monitoring in Cloud Native Environments
PPTX
eBPF Workshop
PPTX
Understanding eBPF in a Hurry!
PDF
Meet cute-between-ebpf-and-tracing
PDF
Systems@Scale 2021 BPF Performance Getting Started
PDF
The Open Source Ecosystem for eBPF in Kubernetes
PDF
Security Monitoring with eBPF
PPTX
eBPF Basics
PDF
eBPF Tooling and Debugging Infrastructure
PDF
Performance Wins with eBPF: Getting Started (2021)
PDF
eBPF — Divulging The Hidden Super Power.pdf
PDF
Bpf performance tools chapter 4 bcc
PDF
eBPF — Divulging The Hidden Super Power.pdf
PDF
DEF CON 27 - JEFF DILEO - evil e bpf in depth
PDF
story_of_bpf-1.pdf
PDF
Low Overhead System Tracing with eBPF
DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...
Introduction of eBPF - 時下最夯的Linux Technology
UM2019 Extended BPF: A New Type of Software
Prometheus as exposition format for eBPF programs running on Kubernetes
Efficient System Monitoring in Cloud Native Environments
eBPF Workshop
Understanding eBPF in a Hurry!
Meet cute-between-ebpf-and-tracing
Systems@Scale 2021 BPF Performance Getting Started
The Open Source Ecosystem for eBPF in Kubernetes
Security Monitoring with eBPF
eBPF Basics
eBPF Tooling and Debugging Infrastructure
Performance Wins with eBPF: Getting Started (2021)
eBPF — Divulging The Hidden Super Power.pdf
Bpf performance tools chapter 4 bcc
eBPF — Divulging The Hidden Super Power.pdf
DEF CON 27 - JEFF DILEO - evil e bpf in depth
story_of_bpf-1.pdf
Low Overhead System Tracing with eBPF
Ad

More from InfluxData (20)

PPTX
Announcing InfluxDB Clustered
PDF
Best Practices for Leveraging the Apache Arrow Ecosystem
PDF
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
PDF
Power Your Predictive Analytics with InfluxDB
PDF
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
PDF
Build an Edge-to-Cloud Solution with the MING Stack
PDF
Meet the Founders: An Open Discussion About Rewriting Using Rust
PDF
Introducing InfluxDB Cloud Dedicated
PDF
Gain Better Observability with OpenTelemetry and InfluxDB
PPTX
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
PDF
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
PPTX
Introducing InfluxDB’s New Time Series Database Storage Engine
PDF
Start Automating InfluxDB Deployments at the Edge with balena
PDF
Understanding InfluxDB’s New Storage Engine
PDF
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
PPTX
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
PDF
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
PDF
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
PDF
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
PDF
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Announcing InfluxDB Clustered
Best Practices for Leveraging the Apache Arrow Ecosystem
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
Power Your Predictive Analytics with InfluxDB
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
Build an Edge-to-Cloud Solution with the MING Stack
Meet the Founders: An Open Discussion About Rewriting Using Rust
Introducing InfluxDB Cloud Dedicated
Gain Better Observability with OpenTelemetry and InfluxDB
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
Introducing InfluxDB’s New Time Series Database Storage Engine
Start Automating InfluxDB Deployments at the Edge with balena
Understanding InfluxDB’s New Storage Engine
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022

Recently uploaded (20)

PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
Sims 4 Historia para lo sims 4 para jugar
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
E -tech empowerment technologies PowerPoint
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
Digital Literacy And Online Safety on internet
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Introduction to the IoT system, how the IoT system works
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
introduction about ICD -10 & ICD-11 ppt.pptx
Sims 4 Historia para lo sims 4 para jugar
Unit-1 introduction to cyber security discuss about how to secure a system
SASE Traffic Flow - ZTNA Connector-1.pdf
E -tech empowerment technologies PowerPoint
Cloud-Scale Log Monitoring _ Datadog.pdf
Decoding a Decade: 10 Years of Applied CTI Discipline
Introuction about ICD -10 and ICD-11 PPT.pptx
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Digital Literacy And Online Safety on internet
Power Point - Lesson 3_2.pptx grad school presentation
international classification of diseases ICD-10 review PPT.pptx
Introduction to the IoT system, how the IoT system works
Module 1 - Cyber Law and Ethics 101.pptx
Design_with_Watersergyerge45hrbgre4top (1).ppt
Paper PDF World Game (s) Great Redesign.pdf
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
RPKI Status Update, presented by Makito Lay at IDNOG 10
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Introduction about ICD -10 and ICD11 on 5.8.25.pptx

eBPF Powered Distributed Kubernetes Performance Analysis - Lorenzo Fontana, InfluxData

  • 2. @fntlnz eBPF (extended BPF) Extended Berkeley Packet Filter
  • 3. © 2018 InfluxData. All rights reserved.3 BPF is a Tracing Framework* Used to access kernel trace backend instrumentation tools *Actually, it’s not just that. And there’s also XDP.
  • 4. © 2018 InfluxData. All rights reserved.4 Static tracepoints sched: task: signal: timer: workqueue: irq: kvm: tcp: @fntlnz
  • 5. © 2018 InfluxData. All rights reserved.5 Dynamic trace functionalities uprobes kprobes XDP @fntlnz
  • 6. © 2018 InfluxData. All rights reserved.6 Aggregate events at kernel side and deal with just a few events instead of thousands of them @fntlnz
  • 7. © 2018 InfluxData. All rights reserved.7 eBPF program lifecycle Kernel space User space User program eBPF bytecode Static verifier BPF BPF_MAP_* Results (bpf_lookup_elem) uprobes kprobes tracepoints BPF_PROG_LOAD see man 2 bpf The mustache parrot warns! eBPF programs can’t be turing complete! XDP socketfilter
  • 9. © 2018 InfluxData. All rights reserved.9 In today’s world: tcpdump -d stands for: Dump the compiled packet-matching code in a human readable form to standard output and stop. Documentation about the instruction set: https://www.kernel.org/doc/Documentation/networking/filter.txt Is it an ethernet IP IPv4 packet? Is src (x+14) on port 80 (0x50)? Is dst (x+16) on port 80 (0x50)?
  • 11. © 2018 InfluxData. All rights reserved.11 11 @fntlnz More practical examples? ¨ Trace file opens by filename ¨ Trace queries done against a database, like InfluxDB or MySQL ¨ Trace TCP retransmissions ¨ Trace all commands done in a bash shell ¨ Trace block device I/O latency over time ¨ JVM events ¨ Go Runtime Events ¨ Firewalls, packet rewriting, dropping etc..
  • 13. © 2018 InfluxData. All rights reserved.13 13 @fntlnz iovisor/gobpf
  • 14. © 2018 InfluxData. All rights reserved.14 14 @fntlnz iovisor/bpftrace Program from file Inline programs
  • 15. © 2018 InfluxData. All rights reserved.15 15 @fntlnz bpftrace probe types
  • 17. © 2018 InfluxData. All rights reserved.17 17 @fntlnz github.com/fntlnz/kubectl-trace The kubectl trace plugin Your bpftrace program The node where to run it in your cluster Attach the terminal to the program’s TTY
  • 18. © 2018 InfluxData. All rights reserved.18 18 @fntlnz github.com/fntlnz/kubectl-trace Run program from file Ctrl-C tells the program to Plot the results using hist() The output histogram
  • 19. © 2018 InfluxData. All rights reserved.19 19 @fntlnz kubectl trace and visidata!
  • 21. © 2018 InfluxData. All rights reserved.21 Any BPF Books to recommend ? David and Jessie are writing one!!
  • 22. © 2018 InfluxData. All rights reserved.22 References 1. https://www.iovisor.org/ 2. https://github.com/cilium/cilium 3. https://github.com/iovisor/gobpf 4. https://landlock.io/ 5. https://github.com/iovisor/bpftrace 6. https://github.com/iovisor/bpf-docs 7. https://medium.com/@fntlnz/load-xdp-programs-using-the-ip-iproute2-command-502043898263 8. https://www.youtube.com/watch?v=JRFNIKUROPE 9. https://cilium.readthedocs.io/en/latest/bpf/ 1. iovisor BCC 2. Cilium: HTTP, gRPC, and Kafka Aware Security and Networking for Containers with BPF and XDP 3. iovisor/gobpf - To load eBPF programs using Go 4. Landlock LSM 5. iovisor bpftrace 6. iovisor BPF docs 7. Blog post on how to load xdp programs using iproute2 8. BPF Tracing Talk from Brendan Gregg 9. Cilium documentation for BPF
  • 23. @fntlnz Thank you!lorenzo@influxdata.com twitter.com/fntlnz github.com/fntlnz If you’re that kind of person can find my pgp key here: https://fntlnz.wtf/downloads/pubkey-B2400EE4.asc