Announcing bpftop: Streamlining eBPF efficiency optimization | by Netflix Technology Blog | Feb, 2024

0
304
Announcing bpftop: Streamlining eBPF efficiency optimization | by Netflix Technology Blog | Feb, 2024


Netflix Technology Blog

Netflix TechBlog

By Jose Fernandez

Today, we’re thrilled to announce the discharge of bpftop, a command-line device designed to streamline the efficiency optimization and monitoring of eBPF functions. As Netflix more and more adopts eBPF [1, 2], making use of the identical rigor to those functions as we do to different managed companies is crucial. Striking a stability between eBPF’s advantages and system load is essential, guaranteeing it enhances moderately than hinders our operational effectivity. This device allows Netflix to embrace eBPF’s potential.

bpftop gives a dynamic real-time view of operating eBPF applications. It shows the typical execution runtime, occasions per second, and estimated complete CPU % for every program. This device minimizes overhead by enabling efficiency statistics solely whereas it’s energetic.

bpftop simplifies the efficiency optimization course of for eBPF applications by enabling an environment friendly cycle of benchmarking, code refinement, and speedy suggestions. Without bpftop, optimization efforts would require guide calculations, including pointless complexity to the method. With bpftop, customers can shortly set up a baseline, implement enhancements, and confirm enhancements, streamlining the method.

A standout characteristic of this device is its means to show the statistics in time sequence graphs. This strategy can uncover patterns and tendencies that might be missed in any other case.

bpftop makes use of the BPF_ENABLE_STATS syscall command to allow international eBPF runtime statistics gathering, which is disabled by default to scale back efficiency overhead. It collects these statistics each second, calculating the typical runtime, occasions per second, and estimated CPU utilization for every eBPF program inside that pattern interval. This data is displayed in a top-like tabular format or a time sequence graph over a 10s transferring window. Once bpftop terminates, it turns off the statistics-gathering perform. The device is written in Rust, leveraging the libbpf-rs and ratatui crates.

Visit the challenge’s GitHub web page to study extra about utilizing the device. We’ve open-sourced bpftop beneath the Apache 2 license and stay up for contributions from the neighborhood.

LEAVE A REPLY

Please enter your comment!
Please enter your name here