Database Connection Pool Calculator
Sizes a connection pool from throughput and query time, and warns when it is too big.
Loading the tool…
How to use this tool
- Write your workload one setting per line: queries per second, average query ms, app instances, database max connections, database cores.
- Use the query time your application measures, not the one the database reports — the difference is network time and it is held by the connection too.
- Select Size the pool.
- If the result warns that the pool is larger than the cores can use, lower it rather than raising the server limit.
What connection pool calculator does
Connection pools are almost always set to whatever the driver defaults to, and then raised whenever anything is slow. Raising them is the wrong instinct: past the point where every core is busy, extra connections add memory and context switching without adding a single query per second, and latency goes up rather than down. The number you actually need comes from one line of arithmetic — the arrival rate multiplied by how long each query is held — and it is usually much smaller than people expect.
Give this page your queries per second, your average query time, how many application instances you run and what the server limit is, and it returns the pool size per instance and the total, with the working shown. It then checks two things people miss: whether the total leaves any headroom for migrations, admin sessions and a rolling deploy that briefly doubles the instance count, and whether the pool is larger than the server has cores to run. It also names what it cannot see — long transactions and connections held across an external call consume a slot without doing work, and they are the usual reason a correctly sized pool still runs dry.