Pool Size vs Throughput
Optimal pool size.
Overview
Pool size and throughput have a non-linear relationship: throughput rises with pool size up to a peak, then degrades as contention dominates. The peak is per-application: a CPU-bound workload peaks at smaller pool sizes than an IO-bound one, and a latency-sensitive workload usually wants pools sized below the throughput peak so queuing time stays bounded. The default value the framework ships with is almost never the right one for production workloads.
- Optimal pool size. Per-application optimal pool size benchmarked against the actual workload; the default is rarely the answer.
- Throughput peaks then degrades. Per-pool throughput curve has a peak; past the peak, contention costs more than concurrency adds.
- Per-app benchmark. Per-app benchmark against representative load; the curve tells you where to land.
- Latency-sensitive smaller plus per-pool monitoring. Per-latency-sensitive workload smaller pool keeps queue time bounded; per-pool utilization and latency monitored continuously.
The approach
The practical approach is to benchmark per application against representative load, monitor pool utilization and per-request latency continuously, size below the throughput peak when latency matters more than throughput, retest quarterly because workloads drift, and document the per-pool size with its supporting curve in the infrastructure repo so the choice is reviewable.
- Per-app benchmark. Per-app benchmark against representative load; the data tells you where the peak is.
- Monitor utilization. Per-pool utilization plus per-request latency; the metrics surface drift before it becomes incident-time discovery.
- Latency-sensitive smaller. Per-latency-sensitive workload sized below the throughput peak; queue time stays bounded.
- Per-quarter retest plus documented curve. Per-quarter benchmark retest catches workload drift; per-pool sizing rationale committed to the repo for operational review.
Why this compounds
Pool sizing discipline compounds across services. Each correctly-sized pool produces ongoing throughput; each documented curve survives team turnover; new services inherit the benchmarking practice rather than re-deriving it. The opposite, where pool size is set once at deploy time and never revisited, accumulates inefficiency and surprise during traffic spikes.
- Throughput. Right size matches workload; the application runs at design throughput rather than at the framework default.
- Resource utilization. Right size matches reality; the database connection budget supports the application without over-allocating.
- Engineering culture. Benchmark-driven decisions replace framework defaults; the team picks based on data rather than habit.
- Institutional knowledge. Each pool teaches contention patterns; the team builds intuition for pool-sizing tradeoffs.
Pool sizing discipline is an operational discipline that pays off across years. Nova AI Ops integrates with database telemetry, surfaces pool patterns, and supports the team’s capacity engineering discipline.