Reliability vs Memory Efficiency of eBPF Instrumentation: Why Not Both? by Dom Delnano
ScyllaDB
0 views
21 slides
Oct 08, 2025
Slide 1 of 21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
About This Presentation
Zero-instrumentation eBPF tooling promises instant insights, but making it reliable and lightweight is a serious challenge. This talk shows how CNCF Pixie profiled its own memory use, uncovered issues with DWARF-intensive Uprobes, and redesigned them to cut memory usage while preserving probe stabil...
Zero-instrumentation eBPF tooling promises instant insights, but making it reliable and lightweight is a serious challenge. This talk shows how CNCF Pixie profiled its own memory use, uncovered issues with DWARF-intensive Uprobes, and redesigned them to cut memory usage while preserving probe stability. We’ll cover design patterns for memory-lean Uprobe instrumentation, using pprof directly in your application, and how to balance reliability and efficiency instead of choosing between them.
Size: 2.06 MB
Language: en
Added: Oct 08, 2025
Slides: 21 pages
Slide Content
A ScyllaDB Community
Reliability vs Memory Efficiency
of eBPF Instrumentation:
Why Not Both?
Dom Delnano
Co-Founder/CEO
Pixe Introduction
■Observability tool that provides:
●Microservice protocol traces (latency,
full payload)
●CPU flame graphs
■Our eBPF probes have been in production
for 7 years
■Throughout this journey, we've learned a
thing or two about designing probes
Why Reliable eBPF tracing matters
■Reliable tracing: Stability of probes in the face of target app changes
●Kernel upgrades
●Library changes (OpenSSL, BoringSSL, gRPC, etc)
●Application changes (language version, code changes, etc.)
■eBPF instrumentation promises "zero-instrumentation"
●Black box tracing loses user trust quickly if tooling is brittle
Sources of eBPF probe instability
Struct Layout
Instability
API ("Func Arg")
Instability
Additional API ("Func Arg") complexity
■eBPF PT_REGS_PARM*() helpers use native arch's calling convention
■Most native code is compatible, Golang is an exception (non-native cc.)
■Golang introduced an ABI change in Go 1.17: stack -> register based ABI
Overview of probe stability
eBPF Probe
Struct Layout
Stability
API Stability
("Func Argument")
Overall
Stability
Socket syscalls (tracepoint) ✅ (BTF covers) ✅ Stable ✅ High
Kernel tracing (kprobe) ✅ (BTF covers) ⚠ Prone to change ⚠ Medium
TLS Library (uprobe) ⚠ Prone to
change
⚠ Prone to change ⚠ Medium
Go gRPC Library (uprobe)
⚠ Prone to
change
❌ Prone to change +
ABI changes
❌ Low
Complexity in handling instability
■eBPF needs runtime information for tracing target
●User space must inject into eBPF program
+ volatile const bool is_new_frame_pos;
// func (d *s) operateHeaders(frame *http2.MetaHeadersFrame)
// for version 1.60 and above:
+ // func (d *s) operateHeaders(ctx context.Context,
+ // frame *http2.MetaHeadersFrame,
SEC("uprobe/http2Server_operateHeaders")
int uprobe_http2Server_operateHeaders(struct pt_regs *ctx)
{
u64 frame_pos = 2;
+ if (is_new_frame_pos) {
+ frame_pos = 4;
+ }
void *frame_ptr = get_argument(ctx, frame_pos);
Solution: DWARF-based runtime location
■DWARF solves this for debuggers
■eBPF needs state at function entry/exit instead of journey through call stack
■Provides:
●Struct offsets
●Func arg location
●ABI agnostic – host ABI, Golang stack & reg ABI, stack arg spill
Without vs. With DWARF
SEC("uprobe/http2Server_operateHeaders")
int uprobe_http2Server_operateHeaders(
struct pt_regs *ctx)
{
u64 frame_pos = 2;
if (is_new_frame_pos) {
frame_pos = 4;
}
void *frame_ptr = get_argument(
ctx, frame_pos);
SEC("uprobe/http2Server_operateHeaders")
int uprobe_http2Server_operateHeaders(
struct pt_regs *ctx)
{
const void* sp = (const void*)ctx->sp;
uint64_t* regs = go_regabi_regs(ctx);
void* frame_ptr = NULL;