Buffer Sizing Calculator
An interactive tool that chains the constraints of Aeron’s four receive-path buffers — ENA RX ring, OS socket buffer, term buffer, and flow-control window — into a consistent set of values for your traffic profile.
Enter your message size, target TPS, and network RTT below. The calculator derives every dependent parameter, flags constraint violations, and gives you copy-ready properties.
For the full explanation of why these buffers form a stack and how each constraint is derived, see The Four Receive-Path Buffers.
| On-wire bytes/msg (32B frame header, 32B aligned) | |
| Bandwidth λ = TPS × bytes/msg | |
| BDP = λ × RTT | |
| Initial window aeron.rcv.initial.window.length2–4 × BDP, floored at the 128KB default and at MTU | |
| Term buffer aeron.term.buffer.length≥ 2 × window (Constraint A) AND ≥ 2 × λ × stall headroom (publisher can only race term/2 ahead), power of 2, 64KB–1GB | |
| OS socket receive buffer SO_RCVBUF (aeron.socket.so_rcvbuf)≥ window (Constraint C — refuses to start otherwise); 2× for stall headroom | |
| net.core.rmem_maxkernel ceiling for SO_RCVBUF (sysctl) — if lower, the kernel silently caps the request | |
| Sender egress (N × λ)MDC over unicast endpoints sends N separate copies of every message — bandwidth and PPS both ×N; the first wall is the NIC/instance allowance, not a buffer | |
| SO_SNDBUF (aeron.socket.so_sndbuf) + ENA TX ringa sender-side stall fills these at N×λ; TX ring is only 256–1K entries (512 default with large LLQ) | |
| PPS (packets/sec) | |
| ENA RX ring stall survival (at worst-case PPS) | |
| ENA RX queues (ethtool -L)RSS hashes each flow (5-tuple) to ONE queue — a single Aeron stream lands on one queue/ring/IRQ vCPU | |
| NAK timers (Lever B — loss recovery)derived from RTT: backoff ≥ 2×RTT (≈ ½ per-loss budget); linger ≈ 3×(backoff+RTT); group.size = real receiver count. Full derivation + measured proof on the Lever B page below | |
| MTU recommendation | |
| L3 cache fit |
Scope: this calculator covers loss prevention only (sizing the chain so a stall doesn’t drop). Recovery after a loss is governed by the NAK/retransmit timers — the ~10ms default backoff costs 10–20ms of tail per loss; consider tuning them for small-fan-out streams (see the “Lever B” section below). Also: outputs scale directly with inputs — use measured RTT and stall values, not guesses.