TCP Backlog Sizing Calculator
Work out tcp backlog sizing instantly with clear inputs, formula shown and shareable results.
About TCP Backlog Sizing Calculator
The accept queue holds established connections waiting for the application to call accept, and its depth follows Little's law: connection rate times accept latency. Bursts multiply that, and when the queue overflows the kernel silently drops SYNs so clients see a timeout rather than a refusal. Both the listen() argument and net.core.somaxconn must be raised, since the effective backlog is the smaller of the two.
Formula
Backlog sizing
steady depth = connection rate x accept latency; burst depth = steady x burst factor; recommended = burst depth x 1.5, floor 128
Worked example
With the default values below, TCP Backlog Sizing Calculator returns Recommended backlog of 240. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Incoming connection rateminimum 0.001
- 5,000
- Time for the application to acceptminimum 0.001 ms
- 8 ms
- Burst multiplieraccepts 1–50 x
- 4 x
- Configured backlogminimum 1
- 511
Results
- Recommended backlog
- 240
- Steady-state accept queue depth
- 40.0
- Queue depth during a burst
- 160.0
- Assessment
- Configured backlog is sufficient
Step by step
- 1Values used
- 2Backlog sizing
- 3Recommended backlog= 240
- 4Steady-state accept queue depth= 40.0
- 5Queue depth during a burst= 160.0
- 6Assessment= Configured backlog is sufficient
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why do clients see timeouts rather than connection refused?
Because an overflowing accept queue drops the SYN silently by default. The client retries per its SYN backoff, which looks like a slow network rather than a full server.
Which limit actually applies?
The minimum of the application's listen backlog and net.core.somaxconn. Raising only one has no effect.
Related Calculators
- Bare Metal Sizing Calculator
- Kernel Parameter Sizing Calculator
- LVM Sizing Calculator
- Page Cache Sizing Calculator
- Parallel Job (xargs) Sizing Calculator
- Tmpfs Sizing Calculator
- Account Lockout Policy Calculator
- Backup Size With Retention Calculator
- Bash Script Runtime Calculator
- Block Size Overhead Calculator
You might also need
- LVM Sizing CalculatorAlso in Linux & System Administration
- Tmpfs Sizing CalculatorAlso in Linux & System Administration
- Bare Metal Sizing CalculatorAlso in Linux & System Administration
- Kernel Parameter Sizing CalculatorAlso in Linux & System Administration
- Page Cache Sizing CalculatorAlso in Linux & System Administration
- Parallel Job (xargs) Sizing CalculatorAlso in Linux & System Administration
