Connection Capacity Calculator
Find how many TCP connections a host can hold and whether memory, ports or the table is the limit.
About Connection Capacity Calculator
Three independent ceilings apply at once, and the smallest wins. Client-side sockets are usually port-bound because the local port range is shared, while server-side sockets are memory- or table-bound because they all land on one listening port. Knowing which ceiling binds tells you what to fix: adding RAM does nothing if you are out of ephemeral ports, and widening the port range does nothing if conntrack is full.
Formula
Connection Capacity
capacity = min(memory ÷ per-connection memory, ports × destinations, table limit).
- ports × destinations
- A 4-tuple is unique per destination, so each extra endpoint reuses the whole local port range
- table limit
- nf_conntrack_max or the application's own connection table
Worked example
With the default values below, Connection Capacity Calculator returns Usable Connection Capacity of 112,928. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Memory available for connectionsminimum 0.1 GB
- 16 GB
- Memory per connectionminimum 1 KB
- 40 KB
- Ephemeral port range sizeaccepts 1–65,535 ports
- 28,232 ports
- Distinct destination endpointsminimum 1 endpoints
- 4 endpoints
- Connection / conntrack table limitminimum 1 entries
- 262,144 entries
Results
- Usable Connection Capacity
- 112,928 connections
- Memory-Limited Capacity
- 419,430
- Port-Limited Capacity
- 112,928
- Binding Constraint
- Ephemeral ports
- Memory Used At Capacity
- 4.31 GB
Step by step
- 1Values used
- 2Connection Capacity
- 3Usable Connection Capacity= 112,928 connections
- 4Memory-Limited Capacity= 419,430
- 5Port-Limited Capacity= 112,928
- 6Binding Constraint= Ephemeral ports
- 7Memory Used At Capacity= 4.31 GB
Assumptions and limits
- The result is derived only from the 5 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 2 decimal places, 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
How is Connection Capacity calculated?
capacity = min(memory ÷ per-connection memory, ports × destinations, table limit). Three independent ceilings apply at once, and the smallest wins. Client-side sockets are usually port-bound because the local port range is shared, while server-side sockets are memory- or table-bound because they all land on one listening port.
Why does Connection Capacity matter?
Knowing which ceiling binds tells you what to fix: adding RAM does nothing if you are out of ephemeral ports, and widening the port range does nothing if conntrack is full.
What values do I need to enter?
This calculator takes 5 inputs: Memory available for connections, Memory per connection, Ephemeral port range size, Distinct destination endpoints, Connection / conntrack table limit. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Why does the destination count multiply capacity?
A connection is identified by the full 4-tuple, so the same local port may be reused against a different destination IP or port. Fanning traffic across more backend endpoints multiplies the number of outbound connections a client can open.
Related Calculators
You might also need
- Socket Buffer CalculatorCommonly used together
- Connection Timeout CalculatorCommonly used together
- Session Capacity CalculatorCommonly used together
- TCP Window Size CalculatorAlso in TCP & Transport
- Packets Per Second CalculatorAlso in TCP & Transport
- Bandwidth Delay Product CalculatorAlso in TCP & Transport
