← Home ← Codex ← DEBT ← Engine
Browse by Category
+ added · updated 7d
← Back to glossary

eBPF — Kernel-Level Observability

DevOps Advanced
debt(d7/e3/b3/t3)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). The detection_hints note automated=no and the code_pattern describes a situation where performance bottlenecks are invisible to application-level profilers (Blackfire, Xdebug). Tools like bpftrace, bcc, perf, and strace exist but require deliberate expert-level investigation — there is no automated flag that tells you eBPF should be used or that it is being misused. Misuse (wrong kernel version, unsafe programs) only surfaces at runtime, not via static analysis.

e3 Effort Remediation debt — work required to fix once spotted

Closest to 'simple parameterised fix' (e3). The quick_fix describes adopting bpftrace/bcc tooling to trace PHP-FPM latency — this is an operational/tooling change rather than application code changes, but it does require learning the toolchain, selecting the right probe points, and possibly adjusting kernel version. It's more than a one-line patch but doesn't span multiple application files — it's a contained operational intervention.

b3 Burden Structural debt — long-term weight of choosing wrong

Closest to 'localised tax' (b3). eBPF/bpftrace is an observability tooling choice applied at the infrastructure/ops layer. It doesn't permeate application code, doesn't require code changes in the PHP application, and its footprint is largely confined to the ops/SRE workflow. The applies_to scope (web, cli) is broad but the choice imposes no structural burden on application maintainers beyond knowing the tooling exists.

t3 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'minor surprise (one edge case)' (t3). The misconception field states that developers wrongly assume eBPF requires kernel module development skills — in reality bpftrace provides a high-level scripting interface. This is a moderate but not catastrophic misconception: it causes developers to avoid the tool unnecessarily rather than use it dangerously. Common mistakes (kernel version requirements, APM sufficiency) add minor edge-case surprises but the overall concept behaves roughly as advertised once the scripting-vs-kernel-module distinction is understood.

About DEBT scoring →

Also Known As

BPF bpftrace Cilium kernel tracing ebpf observability

TL;DR

Extended Berkeley Packet Filter — a technology for running sandboxed programs in the Linux kernel to trace system calls, network traffic, and performance metrics without modifying applications.

Explanation

eBPF allows verified programs to run in the Linux kernel at event hooks: system calls, network events, CPU samples, function entry/exit. Unlike traditional kernel modules, eBPF programs are verified for safety before loading and cannot crash the kernel. Tools built on eBPF: bpftrace (ad-hoc tracing scripts), Cilium (eBPF-based Kubernetes networking), Falco (security monitoring), and Pixie (Kubernetes observability without instrumentation). For PHP: eBPF can trace PHP function calls, memory allocation, and system calls without any PHP code changes — the ultimate zero-instrumentation observability.

Common Misconception

eBPF requires kernel module development skills — bpftrace provides a high-level scripting language for ad-hoc tracing; writing useful eBPF scripts requires Linux knowledge but not kernel programming.

Why It Matters

Instrumenting a PHP application in production normally requires code changes and redeployment — eBPF can trace PHP function call latency, memory allocations, and system calls on any running process in real time without any application changes.

Common Mistakes

  • Running eBPF on kernels < 4.18 — many features require Linux 5.x+.
  • Unsafe eBPF programs in production — the kernel verifier prevents crashes, but complex programs need testing.
  • eBPF for application-level tracing when APM is sufficient — eBPF shines for system-level and cross-process tracing.
  • Not understanding that eBPF programs are JIT-compiled by the kernel — they run efficiently but need proper management.

Code Examples

✗ Vulnerable
# No tracing — diagnosing PHP performance issues:
# Mystery: PHP workers spending time in kernel
# Tool: strace (high overhead, sequential only)
# Coverage: one process at a time
# Production impact: 10-100x slowdown on traced process
✓ Fixed
# bpftrace — trace all PHP system calls with low overhead:
# Trace slow system calls (> 1ms) for any PHP process:
bpftrace -e '
    tracepoint:syscalls:sys_enter_read
    /comm == "php-fpm"/ {
        @start[tid] = nsecs;
    }
    tracepoint:syscalls:sys_exit_read
    /comm == "php-fpm" && @start[tid]/ {
        $dur = (nsecs - @start[tid]) / 1000000;
        if ($dur > 1) printf("%s: read took %dms\n", comm, $dur);
        delete(@start[tid]);
    }
'
# Shows which file reads are slow — no PHP changes needed

Added 16 Mar 2026
Edited 22 Mar 2026
Views 108
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings F 0 pings S 0 pings S 1 ping M 2 pings T 0 pings W 2 pings T 0 pings F 0 pings S 1 ping S 1 ping M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 1 ping T 0 pings W 0 pings T 1 ping F 1 ping S
Amazonbot 1
Amazonbot 1
Amazonbot 22 Ahrefs 7 Google 7 Bing 5 SEMrush 5 Perplexity 4 PetalBot 4 Brave Search 3 Applebot 3 Majestic 2 Meta AI 2 DuckDuckGo 2 Unknown AI 2 Scrapy 2 ChatGPT 1 Twitter/X 1
crawler 70 crawler_json 2
DEV INTEL Tools & Severity
🔵 Info ⚙ Fix effort: High
⚡ Quick Fix
Use BPF tools (bpftrace, bcc) to trace PHP-FPM request latency at the kernel level without modifying PHP — identify system call bottlenecks invisible to application-level profilers
📦 Applies To
any web cli
🔗 Prerequisites
🔍 Detection Hints
Performance bottleneck not visible in application profiler but latency still high; system call overhead invisible to Blackfire or Xdebug
Auto-detectable: ✗ No bpftrace bcc perf strace
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: High Context: File

References


✓ schema.org compliant