High Latency at Low CPU? Your Queue Is Hiding Behind the Average
Two services at 80% CPU. One is fine, one pages you every morning. The difference is the wait, and you can measure it directly.

Two services both run at 80% CPU.
One of them is fine all day. The other pages you every morning at 9:02, and every time someone opens the dashboard they see the same thing: CPU under the line, memory flat, database bored, zero errors.
The CPU number isn't wrong in either case. It's just answering the wrong question. Utilization measures how often a resource was busy. Latency is mostly decided by how long requests waited before anything started on them. This post shows why those two drift apart, with numbers you can run yourself, and how to put the wait on a graph.

The formula behind "keep it under 80%"
In the simplest queueing model (one server, random arrivals, random job times, the M/M/1 queue), the average time a request waits in line is:
wait = job_time × u / (1 − u) where u = utilization (0 to 1)
That gives the familiar hockey stick:
| Utilization | Average wait (in job-times) |
|---|---|
| 50% | 1.0 |
| 70% | 2.3 |
| 80% | 4.0 |
| 90% | 9.0 |
| 95% | 19.0 |
This curve is where the 80% rule comes from. It's real. But it quietly assumes three things production rarely gives you: a metric that zooms in as far as the queue does, jobs that are roughly the same size, and a single line in front of the server. The rest of this post is what happens when each assumption breaks.
1. The average is longer than the burst
Take a server that handles 100 requests per second. 3,000 requests arrive in the first 20 seconds of a minute (150/s), then none.
- The backlog grows by 50 every second, peaking at 1,000 waiting at t = 20 s.
- It drains at 100/s, so the last arrivals wait about 10 seconds for 10 ms of work.
- A 1-minute CPU chart shows 50%. A 5-minute chart (EC2's default basic monitoring period) shows 10% if the following minutes are quiet.

Containers shrink the timescale further. Kubernetes CPU limits are enforced by the CFS bandwidth controller in 100 ms periods by default. A pod with limits.cpu: 500m gets 50 ms of CPU per 100 ms window; burn it early with a few threads and the whole cgroup is frozen until the window resets. Your minute-level graph can say 40% while requests stall every tenth of a second.
Put the throttle ratio next to the CPU graph:
# share of 100 ms enforcement periods in which the container was throttled
sum by (pod) (rate(container_cpu_cfs_throttled_periods_total{container="api"}[5m]))
/
sum by (pod) (rate(container_cpu_cfs_periods_total{container="api"}[5m]))
A ratio that's routinely above a few percent on a latency-sensitive service is worth investigating, whatever the CPU percentage says.
2. A few slow jobs set everyone's wait
Kingman's approximation for a single queue with any arrival and job-time distribution:
wait ≈ [u / (1 − u)] × [(ca² + cs²) / 2] × job_time
cs is the coefficient of variation of job times (standard deviation ÷ mean), ca the same for gaps between arrivals. Random, well-behaved traffic gives a middle term of about 1. Bigger spread, bigger multiplier.
A concrete mix: 95% of requests take 10 ms, 5% are exports that take 400 ms.
mix = [(0.95, 10), (0.05, 400)] # (share, ms)
mean = sum(p * t for p, t in mix) # 29.5 ms
var = sum(p * t * t for p, t in mix) - mean ** 2
cs2 = var / mean ** 2 # ~8.3
variability = (1 + cs2) / 2 # ~4.7 with random arrivals
At the same utilization, that endpoint's queue is roughly 4.7× longer than the textbook curve. Most of the people in it are the 10 ms requests. Bunched arrivals (top-of-the-hour cron, push notifications, retry waves) raise ca and do the same thing.
3. Private lines waste the servers you have
Same 8 workers, same traffic, 80% busy:
- 8 separate lines (each worker gets its own queue): each behaves like M/M/1, so the average wait is about 4.0 job-times.
- 1 shared line feeding all 8: the M/M/c model gives about 0.29 job-times.
Roughly 14× less waiting from the same hardware. You can check with the Erlang C formula:
from math import factorial
def erlang_c(c, u):
"""Probability a request has to wait, c servers sharing one line at utilization u."""
a = c * u
head = sum(a**k / factorial(k) for k in range(c))
tail = a**c / factorial(c) / (1 - u)
return tail / (head + tail)
def avg_wait(c, u):
"""Average wait in units of one job time (M/M/c)."""
return erlang_c(c, u) / (c * (1 - u))
print(avg_wait(1, 0.8)) # 4.0
print(avg_wait(8, 0.8)) # ~0.29
Where private lines sneak into backend systems:
- Round-robin load balancing to single-threaded workers (prefer least-outstanding-requests or a shared queue)
- Kafka partitions: each one is consumed in order by a single consumer in the group, so a hot key builds one long line
- Per-tenant queues with dedicated workers, sticky sessions
Combine variability and pooling and the 80% rule breaks in both directions. Holding the average wait under one average job time, the models give:

| Setup | Highest utilization for avg wait ≤ 1 job-time |
|---|---|
| 1 worker, 5% slow jobs | ~18% |
| 1 worker, even jobs | 50% |
| 16 workers, one line, 5% slow jobs | ~86% |
| 16 workers, one line, even jobs | ~95% |
These are model estimates (M/M/c with the Allen-Cunneen correction for variability). Treat them as direction, then measure.
4. The full line usually isn't the CPU
Little's law: items in a system = arrival rate × time each spends in it. No distribution assumptions.
200 requests/s, each holding a DB connection for 90 ms:
connections in use = 200 × 0.090 = 18 pool size = 20 pool utilization = 90%
Modeled as 20 servers sharing one line, more than half of requests already wait for a connection (Erlang C ≈ 0.55). About 5% more traffic takes the pool to 95% and nearly triples the average acquire wait. App CPU can sit at 35% the whole time. Same story for PHP-FPM's pm.max_children, thread pools, and upstream rate limits.
5. Instrument the wait directly
Web requests. Have the proxy stamp arrival time and let your APM subtract it from app start (request queuing):
proxy_set_header X-Request-Start "t=${msec}";
On PHP-FPM, enable the status page and watch listen queue / max listen queue:
; www.conf
pm.status_path = /fpm-status
Job queues. Alert on the age of the oldest job, not queue length. Laravel Horizon:
// config/horizon.php
'waits' => [
'redis:default' => 30, // seconds before LongWaitDetected fires
'redis:exports' => 300,
],
Sidekiq exposes the same idea as Sidekiq::Queue.new("default").latency.
Connection pools. Graph acquire time and the number of waiting callers. Streams. Graph lag per partition, never only the total.
6. Set headroom from a wait budget
- Pick the wait you can afford per line (for example, queue time under one average job time, or oldest job under 30 s).
- Alert on that wait. Keep utilization for capacity planning.
- Autoscale on the line that's actually full: queue age, in-flight requests, lag.
- Split lanes by job size (exports get their own workers), never at random.
- Bound every queue. Past the useful wait, reject fast instead of building a backlog that outlives the burst.
The Zoom Test: take last week's worst p99 minute. Re-graph the busiest resource on that path at 1-second resolution and put its wait metric beside it. If you can't produce the wait metric, that's the finding.

Key Takeaways
- Utilization measures how often a resource was busy; latency is decided by how long requests waited.
- Averaging windows (1–5 min, or 100 ms CFS periods under CPU limits) hide bursts that build real queues.
- Job-size variability multiplies waiting: a 5% slow tail can make a queue ~4.7× longer at the same utilization.
- One shared line in front of many workers waits far less than many private lines at the same load.
- Little's law finds the line that's actually full, which is often a pool, not the CPU.
- Alert and autoscale on wait, queue age, or lag. Set headroom from a wait budget, not a fixed percentage.
FAQ
Why is my API latency high when CPU utilization is low?
Because latency includes queueing delay, and CPU utilization doesn't measure it. Short bursts averaged over a minute, a few slow requests mixed with fast ones, CPU throttling under container limits, or a full connection pool can all create long waits while average CPU looks low.
Is 80% CPU utilization safe for a web server?
It depends on the shape of the work. A single worker with variable job sizes can be in trouble well below 50%, while many workers pulling from one shared queue with uniform jobs can run above 90% with little waiting. Set a wait budget and find the utilization that meets it.
What is queueing delay?
Queueing delay is the time a request spends ready to be processed but waiting for a free worker, thread, connection, or CPU slot. Total latency is queueing delay plus service time, and near saturation the queueing part dominates.
How do I measure queue wait time in production?
Use request queue time from a proxy timestamp header, PHP-FPM's listen queue, the age of the oldest job in your job queue, connection-pool acquire time, consumer lag per partition, and CPU throttled periods for containers. Graph each next to its utilization.
What is Little's law and how do I use it for capacity planning?
Little's law says the average number of items in a system equals the arrival rate times the average time each item spends in it. Multiply your request rate by how long each request holds a resource to see how many of that resource are busy, then compare it with the pool size.
Should I autoscale on CPU utilization?
Only if CPU is the line that fills first. If requests wait on a connection pool, worker count, or job queue, scale on queue age, in-flight requests, or lag, because those move before CPU does.
Related reading
- Your Database Is Fine. Your App Is Dying Anyway. (the connection pool as a queue)
- Metastable Failures: Why Your System Stays Down After the Cause Is Fixed (why you bound the line)
- Tail latency and fan-out: why p99 hits most users
- Cache stampede: soft TTL and hard TTL (Little's law in a thundering herd)
- Start Here: A Plain-English Map
The bottom line
Utilization still belongs on your dashboard, for cost and capacity. It just can't see a burst shorter than its window, a slow job holding up fast ones, or a private line in front of one worker. The wait sees all three.
Headroom isn't the empty part of a CPU graph. It's the time nobody spends in line.
Keep reading: Start Here: the map to everything on Simply Explained · 📬 Get one of these in your inbox each week: simplyexplainedbyaj.substack.com
Adam Jaber is a software engineer who writes Simply Explained: complex topics, made simple. No jargon, no hype.
About the author
- I'm a senior software engineer. I write Simply Explained, a plain-English breakdown of how AI and software actually work, and the quiet ways they break: AI fixes that hide bugs, agents that pick the wrong tool, health checks that take down healthy servers. One symptom, one analogy, one fix per piece. New here? Start with the pinned Start Here guide, or get one breakdown a week by email.
Comments
Join the discussionNo comments yet. Be the first to comment.




