Connection Pool Sizing Calculator

Calculate the optimal database connection pool size using the HikariCP formula and Little's Law analysis.

Use the Connection Pool Sizing Calculator

HikariCP Formula Inputs

Physical or virtual cores available to the database server.

Use 1 for SSD / NVMe. Use the number of physical spinning disks for HDD arrays.

Little's Law Inputs (optional)

Peak throughput of queries or requests reaching the database each second.

Mean time a single query occupies a connection, in milliseconds.

Deployment Scale

How many application server instances share the database.

HikariCP Hardware Ceiling

total DB capacity = (cores × 2) + spindles

Little's Law Workload Demand

L = concurrency × (query_ms / 1000)

Enter Peak Request Rate and Average Query Duration to enable.
Copied!

Summary

Calculate the optimal database connection pool size using the HikariCP formula and Little's Law analysis.

How it works

  1. Enter your database server's CPU core count and storage spindle count (use 1 for SSD or NVMe).
  2. Optionally add Little's Law inputs: peak concurrent requests per second and average query duration.
  3. The tool calculates total DB hardware capacity via HikariCP (cores × 2 + spindles) and allocates it across app instances.
  4. Compare against Little's Law concurrency demand without exceeding the hardware ceiling; excess queries queue safely.

Use cases

  • Sizing a HikariCP pool for a Spring Boot or Java service.
  • Tuning PostgreSQL max_connections alongside PgBouncer pool size.
  • Estimating connection requirements before a production launch.
  • Diagnosing connection exhaustion or idle-connection waste.
  • Capacity planning when scaling from one to multiple app servers.

Frequently Asked Questions

Last updated: 2026-09-19 · Reviewed by Nham Vu