Part of the Technology & IT suite · 45 calculators

Connection Pool Size Calculator

How many database connections an application actually holds at once — Little’s law from queries per second and their duration — and a pool size with headroom, compared with the database-side rule of thumb.

Little’s law: the average number of connections busy is the query rate times the average time each holds a connection.

Results update as you type
Results
Pool size per instance
10
Connections busy on average
Total across all instances
Database-side guidance (2 × cores + 1 disk)
Check
Reviewed September 2026. Computing arithmetic: bytes, bits, seconds and probabilities do not change by country. Australian broadband speeds are quoted in megabits per second (Mbps).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About connection pool size

How the connection pool size calculator works

Little’s law: the average number of connections busy is the query rate times the average time each holds a connection. 200 queries a second at 25 ms each keep five connections busy; add headroom for bursts and slow queries and you have the pool. On the database side, PostgreSQL’s guidance of about 2 × cores + spindles connections total is the ceiling that many small pools across many app instances must fit under.

Formula: in use = queries per second × seconds per query; pool = in use × (1 + headroom)

Worked examples

InputsPool size per instanceNote
200 qps at 25 ms, 100% headroom, 4 instances1010 per instance, 40 total — over the 17 guidance
A quiet service: 20 qps at 10 ms11 per instance
Slow reports: 5 qps at 2 s1515

Frequently asked questions

Why are big pools bad?

A database does work with its cores; connections beyond a few per core just queue inside the database, add memory per connection and contend on locks. Benchmarks routinely show throughput falling as pools grow past the core count.

What time do I use for the query?

The whole time the connection is checked out — including transaction time, network round trips and idle-in-transaction — not just the query’s execution time. Measure it from the pool’s metrics.

What if I have many application instances?

Their pools add up on the database. Either make each pool small, or put a connection pooler between them and the database so hundreds of client connections share a few dozen server ones.

Where does 2 × cores + spindles come from?

The PostgreSQL community’s empirical formula for the number of active connections at which throughput peaks: two per core plus one per disk (one for an SSD). It is a starting point, not a law.

Where these figures come from

Last checked: September 2026. Units follow the SI decimal convention (IEC 80000-13 defines the binary alternatives); network and security figures cite the defining standard.