Connection Capacity Calculator
Find how many TCP connections a host can hold and whether memory, ports or the table is the limit.
Inputs
Usable Connection Capacity
112,928connections
Memory-Limited Capacity
419,430
Port-Limited Capacity
112,928
Binding Constraint
Ephemeral ports
Memory Used At Capacity
4.31GB
Step by step
Values used
Memory available for connections = 16 GB; Memory per connection = 40 KB; Ephemeral port range size = 28,232 ports; Distinct destination endpoints = 4 endpoints; Connection / conntrack table limit = 262,144 entries
Connection Capacity
capacity = min(memory ÷ per-connection memory, ports × destinations, table limit).
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
How it works
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
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.
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