Low-Overhead System Tracing With eBPF
May 2018
Akshay Kapoor DevOps Engineer @ SAP Labs
Low-Overhead System Tracing With eBPF Akshay Kapoor DevOps - - PowerPoint PPT Presentation
Low-Overhead System Tracing With eBPF Akshay Kapoor DevOps Engineer @ SAP Labs May 2018 Low-Overhead System Tracing With eBPF Low-Overhead System Tracing With eBPF Low-Overhead System Tracing With eBPF You don't need to know how to operate
May 2018
Akshay Kapoor DevOps Engineer @ SAP Labs
You don't need to know how to operate an X-ray machine, but you do need to know that if you swallow a penny, an X-ray is an option!
~ www.bredangregg.com
BPF VIRTUAL MACHINE EXTENDED BPF BPF SYSTEM CALL
1993 Before 1992 2013 2014 Today
STACK BASED KERNEL -> USPACE COPIES REGISTER BASED (2) LESSER COPIES IMPROVED ISA & eBPF MAPS MORE REGISTERS (10) EXPOSED TO USER SPACE KERNEL FILTERS UPROBES, KPROBES USDT, TRACEPOINTS
tcpdump -n "dst host 192.168.1.1 and dst port 23"
# Credits : https://suchakra.wordpress.com/
#Credits : Sasha Goldshtein
Flamegraphs [ BCC/BPF Visualizations] (Source : https://blog.cloudflare.com/tracing-system-cpu-on-debian-stretch/)
Call Stacks
PID Y PID X
CONTAINER HOST
Restricts Visibility
CONTAINER 1
HOST
Restricts Quota/Usage
CONTAINER 2
CPU SHARES
0x7f82b510ddda 0x7f82b510999d 0x7f82b510f665 0x7f82b510t546
APP CONTAINER 1 APP CONTAINER 2 BCC TOOLS ON HOST
KERNEL EVENTS
APP CONTAINER 1 APP CONTAINER 2
KERNEL EVENTS
BCC CONTAINER 3
OBSERVABILITY NETWORKING SECURITY
Sasha Goldshtein (goldshtn) Brendan Gregg (brendangregg) Suchakra (tuxology) Julia Evans (b0rk)
https://github.com/iovisor/bcc http://man7.org/linux/man-pages/man2/bpf.2.html http://brendangregg.com/ebpf.html https://github.com/goldshtn/linux-tracing-workshop https://suchakra.wordpress.com/ - eBPF https://blog.yadutaf.fr/ - Networking & eBPF https://jvns.ca/blog/2017/07/05/linux-tracing-systems/ https://www.youtube.com/watch?v=aaTQM7wcmfk – Kernel Meetup | eBPF https://cilium.io/blog/2018/04/17/why-is-the-kernel-community-replacing-iptables/ https://blog.yadutaf.fr/2016/03/30/turn-any-syscall-into-event-introducing-ebpf-kernel-probes/ https://lwn.net/Articles/740157/ - Thorough eBPF intro https://developers.redhat.com/blog/2017/12/13/introducing-stapbpf-systemtaps-new-bpf-backend/ https://lwn.net/Articles/747551/ - BPF comes to firewalls
akshay.kapoor@sap.com akskap akskap akskap