Тёмный

BPF: Tracing and More 

linux conf au 2017 - Hobart, Australia
Подписаться 5 тыс.
Просмотров 40 тыс.
50% 1

Brendan Gregg
linux.conf.au/schedule/present...
A world of new capabilities is emerging for the Linux 4.x series, thanks to enhancements that have been included in Linux for the Berkeley Packet Filter (BPF): an in-kernel virtual machine that can execute user space-defined programs. It is finding uses for security auditing and enforcement, enhancing networking (including eXpress Data Path), and performance observability and troubleshooting. Many new open source tools that have been written in the past 12 months for performance analysis that use BPF. Tracing superpowers have finally arrived for Linux!
For its use with tracing, BPF provides the programmable capabilities to the existing t racing frameworks: kprobes, uprobes, and tracepoints. In particular, BPF allows timestamps to be recorded and compared from custom events, allowing latency to be studied in many new places: kernel and application internals. It also allows data to be efficiently summarized in-kernel, including as histograms. This has allowed dozens of new observability tools to be developed so far, including measuring latency distributions for file system I/O and run queue latency, printing details of storage device I/O and TCP retransmits, investigating blocked stack traces and memory leaks, and a whole lot more.
This talk will summarize BPF capabilities and use cases so far, and then focus on its use to enhance Linux tracing, especially with the open source bcc collection. bcc includes BPF versions of old classics, and many new tools, including execsnoop, opensnoop, funcccount, ext4slower, and more (many of which I developed). Perhaps you'd like to develop new tools, or use the existing tools to find performance wins large and small, especially when instrumenting areas that previously had zero visibility. I'll also summarize how we intend to use these new capabilities to enhance systems analysis at Netflix.

Опубликовано:

 

17 янв 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@DavidMedberry
@DavidMedberry 7 лет назад
Great talk. Timely, important, and 99.99 on a geek scale.
@cupajoesir
@cupajoesir 6 лет назад
I love dense material like this. Each time you watch it you notice something you didn't before. Notice I said dense, not sparse. Too many of the few talks cover advanced topics do it in a way that does not connect the series of ideas. Well done & thanks for posting.
@nagmatnazarov1759
@nagmatnazarov1759 4 года назад
very informative talk, thanks. Have watched this video more than 20 times and each time understood some more stuff...
@NoobTube4148
@NoobTube4148 7 лет назад
This is brilliant. I didn't know you could do stuff like this. Being able to access the kernel with minimal over head on running systems, makes this ideal for troubleshooting on production. This is very cool.
@iqrar318
@iqrar318 5 лет назад
Nice talk! sir how we can use it for power consumption estimation ?
@RogerBarraud
@RogerBarraud 4 года назад
03:22 I think you forgot the 'Amplification' box on the LHS... :-/
@pronounjow
@pronounjow 7 лет назад
I'm not sure that I understand correctly. Is BPF a way to safely issue instructions from user space to kernel space? Is it a way to safely run some part of a user space program in kernel space? Is it a performance tracer? Is it something to build and/or base performance tracers on?
@BrendanGregg
@BrendanGregg 7 лет назад
All of the above, and more. Except the instructions you issue are BPF instructions (its own basic instruction set) -- which are executed by an in-kernel virtual machine that maps them to native instructions (x86_64, etc). That virtual machine provides various security safeguards, so it's preferable to writing a kernel module. It can be used for performance tracers, but also security monitors, and software defined network programs. Lots of uses. So far I've mostly used BPF for performance tracers.
@pronounjow
@pronounjow 7 лет назад
So BPF could be used instead of dedicated kernel modules like drivers in the kernel? That could really slim down the kernel's footprint, I imagine.
@BrendanGregg
@BrendanGregg 7 лет назад
In some cases, yes. The actions a BPF program can do are limited, and while enough for things like observability or redirecting packets, it's unlikely to ever be enough for a full device driver. But yes, the question will be asked in the future whenever someone is proposing writing a kernel module will be -- can this just be a BPF program?
@harshadsinkar1624
@harshadsinkar1624 7 лет назад
Hello Sir, can you point such example where a BPF program can work as kernel driver? (beginner here). Thank you in advance.
@coliniking
@coliniking 7 лет назад
BCC is now available as snap, wiki.ubuntu.com/Kernel/Reference/bcc
@PoeticMachineDreams
@PoeticMachineDreams 6 лет назад
1:54 What architecture is that?
@RogerBarraud
@RogerBarraud 4 года назад
BPF VM in Linux kernel, on whatever ISA Linux is running on.
@RogerBarraud
@RogerBarraud 4 года назад
Remember, There Is No Flame...
@SarfarazAhmad89
@SarfarazAhmad89 7 лет назад
attack surface ?
@RogerBarraud
@RogerBarraud 4 года назад
SSsssssshhh!!!11! :-/
@joshuadfranklin
@joshuadfranklin 7 лет назад
FYI, pony characters who have both a unicorn horn and Pegasus wings are called Alicorns.
@RogerBarraud
@RogerBarraud 4 года назад
04:00 There's thing we used to used, called 'Hardware'...
@cutyboi8630
@cutyboi8630 3 года назад
they are great but using macos seems weird lol
@bahaduroroan7471
@bahaduroroan7471 2 года назад
Bpatl
Далее
The kernel report
44:09
Просмотров 8 тыс.
Kernel Recipes 2017 - Perf in Netflix - Brendan Gregg
51:06
ЮТУБ БЛОКИРУЮТ?
02:04
Просмотров 418 тыс.
SREcon16 - Performance Checklists for SREs
1:01:29
Просмотров 22 тыс.
eBPF - Rethinking the Linux Kernel
51:48
Просмотров 28 тыс.
The Vulkan Graphics API - what it means for Linux
47:00
35C3 -  Kernel Tracing With eBPF
54:08
Просмотров 11 тыс.
eBPF Superpowers
42:19
Просмотров 18 тыс.
Steven Rostedt - Learning the Linux Kernel with tracing
1:07:24
Netflix talks about Extended BPF - A new software type
31:04
ЮТУБ БЛОКИРУЮТ?
02:04
Просмотров 418 тыс.