Unit 3 · OS & concurrency · Lesson 9 of 11
Throughput, latency, Little's law and Amdahl's law
Step 1: Learn the ideas
- Throughput, latency, utilization and concurrency
- Latency distributions, percentiles and tail amplification
- Utilization law and service demand
- Little's law and its assumptions
- Queueing delay near saturation (M/M/1 intuition)
- Open versus closed systems
- Amdahl's law and strong scaling
- Gustafson's law and weak scaling
- Universal Scalability Law: contention and coherency
- Critical path, work and span
- Back-of-the-envelope capacity estimates
Why it matters
Capacity questions such as "how many workers do we need?", "will adding machines fix this?" or "why did latency triple at 80 percent load?" come up in system-design, SRE and research interviews, and they reward a few laws used carefully. The laws are simple; the skill lies in knowing which quantity is an average, which boundary you are measuring and which assumption a real system violates. The same reasoning sizes LLM serving: the number of sequences in flight equals request rate times average request duration, which sets the batch size and KV-cache memory the server must sustain.
Core ideas
Vocabulary. Throughput is completions per unit time. Latency is time per request, best described as a distribution (p50, p99, maximum). Utilization is the fraction of time a resource is busy, and concurrency is the number of requests in progress. For a single resource, the utilization law ties them together: utilization = throughput × service time per request.
Little's law: L = λW. The average number of items in a system equals the average arrival rate times the average time each item spends inside. Example: 400 requests per second at 250 ms average latency means about 100 requests in flight, so a synchronous design needs roughly 100 workers or connections plus headroom. Its assumptions and limits:
- It relates long-run averages of a system in steady state: arrivals and departures balance and the backlog is not growing. During overload or a traffic spike it does not describe the transient.
- L, λ and W must describe the same boundary. Measuring W at the server but L at the client, which also counts time queued in a load balancer, breaks it.
- It holds for any arrival distribution and service order, but it says nothing about percentiles; you cannot derive p99 from it.
Queueing near saturation. For the simplest single-server model (random arrivals, exponential service times), mean response time is S / (1 − ρ), where S is the service time and ρ the utilization: twice the service time at 50 percent, ten times at 90 percent. Real systems are not that model, but the shape generalizes: waiting grows sharply as utilization approaches one, and more variable arrivals or service times make it worse. That is why capacity plans target headroom rather than full utilization.
Bottlenecks. If each request needs D_i seconds of resource i, throughput cannot exceed 1 / max D_i, and latency cannot fall below the sum of the D_i. A single database that needs 4 ms per request caps throughput at 250 requests per second no matter how many application servers you add.
Amdahl's law. If a fraction p of the work parallelizes perfectly across n processors, speedup = 1 / ((1 − p) + p / n), which never exceeds 1 / (1 − p). With p = 0.95, eight cores give about 5.9× and unlimited cores 20×. What it assumes or ignores:
- Fixed problem size (strong scaling). Gustafson's law covers work that grows with n, where scaled speedup can stay close to linear.
- No parallel overhead. Real systems pay for synchronization, communication and contention, and can slow down beyond some n; the Universal Scalability Law adds contention and coherency terms to model that.
- Perfect balance and identical processors. Stragglers and heterogeneous cores change the result.
- No memory effects. Splitting data can make it fit in cache (superlinear speedup) or saturate memory bandwidth (flat speedup).
Critical path. Latency is set by the longest chain of dependent steps (the span), and total work divided by span bounds useful parallelism. Optimizing work off the critical path saves resources, not latency. With fan-out to many backends, the slowest backend sets the response time, so tail latency compounds.
Common misconceptions
- "Little's law gives me p99." It is a statement about means.
- "Little's law needs Poisson arrivals or FIFO service." It is distribution-free; it needs steady state and a consistent boundary.
- "Amdahl proves parallelism is futile." It bounds fixed-size problems with a fixed serial fraction; bigger problems or a smaller serial part change the answer.
- "Doubling servers halves latency." It reduces queueing; service time and the critical path are unchanged.
- "Running at 95 percent utilization is efficient." It buys throughput with large and volatile queueing delay.
- "Average latency describes user experience." Users and fan-out callers experience the tail.
How to approach it
Practice converting between rate, latency and concurrency until it is automatic, and always name the assumption you are relying on. Given scaling data, ask whether the curve flattens (Amdahl-shaped) or peaks and falls (USL-shaped). In interviews, write the formula, plug in numbers, then name the assumption most likely to be violated in that scenario.
Suggested order
- 1Read Marc Brooker's Telling Stories About Little's Law, then restate the law and its steady-state assumption in your own words.
- 2Read Hill and Marty's Amdahl's Law in the Multicore Era for the law, its assumptions and how conclusions change with different core designs.
- 3Read the Universal Scalability Law overview to see how contention and coherency make throughput peak and then fall.
- 4Re-read the USE method with the utilization law in mind: utilization, saturation (queueing) and errors per resource.
- 5Work the drills in the practice guidance: size pools and an LLM serving batch with Little's law, compute Amdahl bounds, and find the bottleneck from service demands.
- 6Do the OSTEP parallel zip project (or use any parallel program you have), measure speedup at 1, 2, 4 and 8 threads, and fit Amdahl’s law to the result.
Step 2: Check off what you can do
Tap each one you can genuinely do or explain. Each earns 10 XP.
Step 3: Go deeper
Telling Stories About Little's LawStart here
Marc Brooker's blogIntuition for Little's law in services, and the feedback effects (latency rising with load, retries) that violate its tidy assumptions.
Open(opens in a new tab)Link responded, 5 Oct 2026Amdahl's Law in the Multicore EraStart here
University of Wisconsin–Madison (Multifacet project)Clear statement of Amdahl's law and an analysis of how its assumptions shape multicore design.
Open(opens in a new tab)Link responded, 5 Oct 2026How to Quantify Scalability (Universal Scalability Law)
Performance DynamicsModel for scaling curves that peak and decline, extending Amdahl with contention and coherency costs.
Open(opens in a new tab)Link responded, 5 Oct 2026The USE Method
Brendan Gregg's websiteTurns utilization and saturation into a per-resource checklist, linking the laws to diagnosis.
Open(opens in a new tab)Link responded, 5 Oct 2026
Step 4: Practice
Do these drills without a calculator first, then check: (1) a service handles 1,200 requests per second at 80 ms mean latency; how many requests are in flight, and how many workers does a thread-per-request design need if workers should be at most 70 percent busy? (2) a job is 90 percent parallel; what is its speedup on 4, 16 and unlimited cores? (3) each request needs 2 ms of CPU on a 4-core application server and 5 ms on a single database; what is the maximum throughput and which resource limits it? Then measure speedup of a parallel program you wrote (the pzip project works) at several thread counts and decide whether Amdahl or the USL fits better. Finally, load-test one service with a closed-loop tool and with a constant-rate tool and compare latency near saturation.
- OSTEP project: parallel zip (pzip)Open(opens in a new tab)Not attemptedOSTEP projects
Record attempts on each problem’s page (+15 XP, +10 more when solved on your own).
Step 5: Test yourself
Answer each one out loud or on paper before you finish the lesson.
- Question 1Which three quantities does Little's law relate, and over what kind of averages?
- Question 2Why can't Little's law predict p99 latency?
- Question 3What is the maximum speedup of a program that is 80 percent parallel, and what assumptions does that answer make?
- Question 4Why does a closed-loop load generator understate latency near saturation?
- Question 5How does fan-out to many backends affect tail latency?
- Question 6When does Gustafson's law describe a workload better than Amdahl's?
You’re done when you can
- Apply Little's law correctly to three sizing questions, stating the steady-state assumption each time.
- Compute Amdahl speedups and limits for simple fractions without a calculator, and list three things the law ignores.
- Explain with the S / (1 − ρ) curve why a system at 90 percent utilization has much worse latency than at 50 percent.
- Identify the bottleneck and the maximum throughput from per-resource service demands.
- Measure a real speedup curve and say which model fits it and why.
Finish the lesson
Unlocks next: Profiling, bottlenecks and benchmarking pitfalls, Transport and queueing foundations for research, SLOs, incidents, capacity and tail latency


