Calculator
Server Capacity Calculator
Estimate how many servers a peak request rate needs from CPU time per request, cores per server, target utilisation and spare capacity.
Results
Servers to run
19 servers
Servers needed plus spares.
- Servers needed at target
- 18 servers
- Usable capacity per server
- 280 req/s
- Maximum per server
- 400 req/s
- Peak utilisation, all servers up
- 65.8%
- Requests in progressLittle's law, CPU time only.
- 100
How it works
A CPU-bound service has a hard ceiling: each core can do one second of work per second. If a request needs 20 ms of CPU, one core handles at most 50 requests per second, and an 8-core server at most 400. Measure CPU time per request under load (total CPU seconds divided by requests), not response latency, which also includes waiting on databases and the network.
Running at 100% is not a plan. Queueing theory shows waiting time grows sharply as utilisation approaches 100%, so latency degrades long before throughput maxes out. A target of 60 to 75% keeps tail latency stable and leaves room for traffic spikes and garbage collection pauses.
Finally, add spare servers so that losing one (a crash, a deployment, a failed zone) does not push the rest over the target. That is N+1 redundancy; across availability zones you may need more. The calculator also applies Little's law to show how many requests are in progress at peak, which sizes thread pools and connection pools.
Formula
- max RPS per core = 1,000 ÷ CPU time per request (ms)
- max RPS per server = max RPS per core × cores
- usable RPS per server = max RPS per server × target utilisation
- servers needed = ceil(peak RPS ÷ usable RPS per server)
- servers to run = servers needed + spare servers
- requests in progress (Little's law) = peak RPS × CPU time per request (s)
Inputs
| Input | Unit | Range | Default |
|---|---|---|---|
| Peak requests per second | req/s | 1 – 100,000,000 | 5,000 |
| CPU time per requestProcessing time on one core, excluding time spent waiting on I/O. | ms | 0.01 – 60,000 | 20 |
| Cores per server | cores | 1 – 1,024 | 8 |
| Target utilisation | % | 1 – 100 | 70 |
| Spare serversN+1 means one spare. | servers | 0 – 1,000 | 1 |
Assumptions
- The service is CPU-bound and scales linearly with cores. Memory, network, lock contention or a downstream database may become the limit first.
- Load is spread evenly across servers (a good load balancer, no hot keys).
- Requests in progress counts only CPU time. Time spent waiting on I/O adds to concurrency: use full response latency in Little's law to size thread and connection pools.
- Spare servers absorb failures and deployments; they are not extra headroom for traffic growth.
Worked example
An API peaks at 5,000 requests per second. Each request uses about 20 ms of CPU, servers have 8 cores, the team targets 70% utilisation and keeps one spare server.
| Peak requests per second | 5,000 req/s |
|---|---|
| CPU time per request | 20 ms |
| Cores per server | 8 cores |
| Target utilisation | 70 % |
| Spare servers | 1 servers |
| Servers to run | 19 servers |
|---|---|
| Servers needed at target | 18 servers |
| Usable capacity per server | 280 req/s |
| Maximum per server | 400 req/s |
| Peak utilisation, all servers up | 65.8% |
| Requests in progress | 100 |
Each server can do 400 requests per second flat out and 280 at the target, so the peak needs 18 servers; run 19. With all 19 healthy the fleet sits near 66% CPU at peak, and losing one server takes it to about 69%, still under target. About 100 requests are on CPU at any moment.