---
title: "Pre-trigger rolling buffer sizing"
---

> Documentation Index
> Fetch the complete documentation index at: https://example.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pre-trigger rolling buffer sizing

Starting capture *after* an alert misses the root cause. Every host keeps a [rolling buffer](https://example.com/ebpf-field-guide/glossary/#rolling-buffer) sized to: `before + after + longest trigger delay + export lag + margin`.

With 30 s before, 10 s after, 20 s fan-out delay, 4 s export lag, and a 10 s margin (74 s, capped at 120 s in lab), even a late fan-out request still finds the pre-fault packets intact in RAM (~512 MB cap at 20 Mbit/s signalling).

## Buffer capacity budget

- Pre-fault + post-fault window → 30s before + 10s after
- Cross-host trigger & export lag → +20s delay + 4s export
- Clock skew & safety margin → +10s (lab configured to 120s)

Source: https://example.com/ebpf-field-guide/production-architecture/incident-capture/buffer-math/index.mdx
