Connection Pool Calculator
Connection pools are almost always sized too large — more connections usually means more context-switching and lock contention on the database, not more throughput. Two established formulas for a starting point, not a target to grow from.
Recommended pool size
Formula:
connections = (core_count × 2) + effective_spindle_count.
This comes from HikariCP's own sizing guidance — on modern SSD/NVMe
storage, effective spindle count is treated as 1 (near-zero seek
time). This produces smaller pools than most people expect, on
purpose — start here and only grow if you have evidence of a
bottleneck, not before.
Theoretical minimum
Recommended pool size
Little's Law:
connections needed = throughput × latency.
If your actual query latency varies a lot (some fast, some slow),
size against your p95 latency rather than the average, or fast
queries will be starved waiting behind slow ones sharing the pool.