The idea: a fixed number of users going round a loop

A computer serves N users at terminals. Each user thinks for a while, sends one request, waits for the answer, and thinks again. Inside the computer the request visits a CPU and two disks, queueing wherever another request is already being served. The number of requests in the whole loop never changes: it is a closed queueing network. Unlike an open queue, the arrival rate is not given. It is an answer: the faster the computer, the sooner users send again.

Terminals with N users and think time Z = 2 s send requests to a CPU. From the CPU a request goes to Disk 1 or Disk 2 and back, or returns to its terminal. Per interaction: CPU V = 11 visits of 9.09 ms, D = 0.10 s; Disk 1 V = 6 visits of 30 ms, D = 0.18 s, the bottleneck; Disk 2 V = 4 visits of 30 ms, D = 0.12 s.
Only the total demand per interaction at each station, D = V · S, matters for the mean values; Disk 1 has the most.

The page uses the classic central-server model. A request starts on the CPU. After each CPU burst it does an I/O on Disk 1 or Disk 2 and comes back, or it is done. Per interaction it makes V = 6 visits to Disk 1, 4 to Disk 2, and 1 + 6 + 4 = 11 CPU bursts. A disk I/O takes S = 30 ms and a CPU burst 9.09 ms. The service demand D = V · S is the total work per interaction: 0.10 s on the CPU, 0.18 s on Disk 1, 0.12 s on Disk 2, D = 0.40 s in all. Think time is Z = 2 s (Demo: follow one interaction).

Operational laws: what you can say from counts alone

Watch the system for a time T and count. No assumption about random distributions is needed; these relations hold for any measured window. With N = 5 users for T = 100 s the monitor saw C = 200 finished interactions, and at each station a number of completions Ck and a busy time Bk (Demo: operational laws from a 100 s measurement).

LawFormulaIn the measurement
ThroughputX = C / T200 / 100 = 2 per second
Forced flowXk = Vk · XV = 2200/200, 1200/200, 800/200 = 11, 6, 4; Xk = 22, 12, 8 per second
UtilisationUk = Bk / T = X · Dk0.20, 0.36, 0.24
Service demandDk = Uk / X0.10, 0.18, 0.12 s
Response timeR = N / X − Z5 / 2 − 2 = 0.5 s

The response time law is Little's law applied to the whole loop: N = X · (R + Z). Here 4 users are thinking on average (X · Z) and 1 request is inside (X · R).

The bottleneck and the asymptotic bounds

Uk = X · Dk can never pass 1, so the station with the largest demand Dmax caps the throughput: X ≤ 1 / Dmax = 1 / 0.18 = 5.56 per second. That station is the bottleneck. With few users there is almost no queueing, and each user finishes one interaction every D + Z seconds, so X ≤ N / (D + Z). For the response time, R ≥ D, and once the bottleneck is saturated R = N / X − Z ≥ N · Dmax − Z (Demo: bottleneck and asymptotic bounds).

X(N) ≤ min( N / (D + Z),  1 / Dmax )
R(N) ≥ max( D,  N · Dmax − Z )
N*   = (D + Z) / Dmax = 2.4 / 0.18 = 13.33     where the two lines meet

Below N* the users spend most of their time thinking; above it, new users mostly add to the queue at Disk 1. The bounds need only three numbers, D, Dmax and Z.

Throughput X against N from 0 to 16. The bound rises along N/(D+Z) and flattens at 1/Dmax = 5.56 from N* = 13.3. The exact MVA curve lies under it: 0.42 at N = 1, 3.65 at N = 10, 4.95 at N = 16, bending near N*.
The exact throughput follows the slope at first and bends under the bottleneck ceiling around N*.

Mean Value Analysis, one population at a time

The bounds say where the curves can be, not where they are. Mean Value Analysis (MVA, Reiser and Lavenberg, 1980) gives the exact mean values for this kind of network (exponential service at FIFO stations, or processor sharing). It rests on the arrival theorem: a request arriving at a station sees, on average, the queue the same network would have with one user fewer. So the row for N needs only the queue lengths of the row for N − 1:

Qk(0) = 0
for N = 1, 2, 3, …
    Rk(N) = Dk · (1 + Qk(N−1))        my work plus the work of those I find there
    R(N)  = Σ Rk(N)
    X(N)  = N / (R(N) + Z)            Little's law on the loop
    Qk(N) = X(N) · Rk(N)              Little's law at each station

At N = 1 nobody waits: R = D = 0.400 s and X = 1 / 2.4 = 0.417 per second. At N = 2 a request finds Q1(1) = 0.075 at Disk 1, so R1 = 0.18 × 1.075 = 0.1935 s, R = 0.4237 s and X = 0.825. Each row checks itself: the queues plus the thinking users add up to N (Demo: exact MVA, N = 1 … 3 step by step). The work is 3 stations × 16 rows of plain arithmetic.

NX per secondR (s)Q at Disk 1Disk 1 busy
10.4170.4000.0757.5 %
51.9910.5110.48935.8 %
103.6540.7371.44665.8 %
134.4130.9462.42779.4 %
164.9521.2313.85489.1 %

The prediction at N = 5, X = 1.991 and R = 0.511 s, is close to the 2.0 and 0.5 s measured above. That is how MVA is used: measure demands at today's load, then ask what happens with more users (Demo: MVA to N = 16).

What-if: speed up the right station

A CPU twice as fast cuts DCPU from 0.10 to 0.05 s. Disk 1 is still the bottleneck, so the ceiling stays at 5.56 and X(16) rises only from 4.952 to 5.054 per second, 2 % (Demo: twice-as-fast CPU barely helps). A Disk 1 twice as fast cuts its demand to 0.09 s. Now Disk 2, with 0.12 s, is the bottleneck, the ceiling rises to 8.33 and N* to 19.25. X(16) becomes 5.910, 19 % more, and R(16) falls from 1.231 to 0.707 s (Demo: twice-as-fast Disk 1 moves the bottleneck). Fixing a bottleneck always reveals the next one.

Bars of X at N = 16: base system 4.95 per second, CPU twice as fast 5.05 (+2 %), Disk 1 twice as fast 5.91 (+19 %). Labels show the bottleneck in each case: Disk 1, Disk 1, Disk 2.
Only a faster bottleneck moves the throughput; the other upgrade saves a little work and nothing else.

A single open queue with Poisson arrivals and its closed formulas is on the M/M/1 queue page; several servers sharing one line are on the M/M/c pooled queues page. When the assumptions of MVA do not hold (priorities, blocking, odd service times), you simulate instead: Discrete-Event Simulation shows the event-list engine. The same bottleneck thinking sizes a database pool in Connection Pool Sizing.

See also 2^k Factorial Design, which finds the factors that explain most of a system's performance with few runs.

See also Simulation Output Analysis, for the error bars you need when a queueing model is simulated instead of solved.

What the page leaves out

The page has one class of users and three stations. Real models often have several classes (MVA extends to them), delay stations other than the terminals, load-dependent servers such as a multi-core CPU, and approximate MVA (Schweitzer's) for large N where the exact recursion gets slow with many classes. It does not prove the arrival theorem or the product form behind it, and it shows mean values only, not percentiles. Open networks (Jackson networks) with a given arrival rate are solved differently, station by station.

On the mind map

Open the Distributed Systems mind mapDistributedSystemsReplication: copies of data · what reads seeReplicationPartitioning: split data over nodesPartitioningTime and membership: order events, know who is aliveTime and membershipConsensus: agree on one value or logConsensusTransactions: one change across many servicesTransactionsMessaging: send events between systemsMessagingKafka internals: a replicated append-only logKafka internalsRedis internals: one thread, data in memoryRedis internalsKubernetes: reconcile desired stateKubernetesResilience and speed: stay up and fast under loadResilience and speedCache strategiesCache strategiescache-aside, write-through, write-behindCircuit breakerCircuit breakerstop calling a failing serviceTMR and N-VersionTMR and N-VersionMajority masks one fault, not a shared bugFault Tree AnalysisFault Tree AnalysisMinimal cut sets; AND multiplies, OR 1−ΠToken vs leaky bucketToken vs leaky buckettoken allows bursts; leaky smoothsBackpressureBackpressurebounded queue: block, drop or ask lessLatency vs throughputLatency vs throughputnear full load, queues blow up p99M/M/1 queueM/M/1 queueW = 1/(μ−λ): waits explode as ρ → 1Pooled queues M/M/cPooled queues M/M/cOne shared line beats separate linesMean Value AnalysisRk = Dk(1 + Qk(N−1)), row by rowDiscrete-event simulationDiscrete-event simulationPop earliest event, jump clock, run handlerSimulation Output AnalysisSimulation Output AnalysisCorrelated data: batch it or replicate itMonolith vs microservicesMonolith vs microservicesfunction call vs network callDistributed tracingDistributed tracingtraceparent links spans across servicesRate limit windowsRate limit windowsfixed window lets 2x burst at the edgeRetry, backoff and jitterRetry, backoff and jitterWait 2^n plus random, or retries stampedeHedged requestsHedged requestsSlow? Send a copy; take the first replyOpen the Distributed Systems mind mapDistributed Systemsstay up and fast under loadResilience and speedCache strategiesCache strategiescache-aside, write-through, write-behindCircuit breakerCircuit breakerstop calling a failing serviceTMR and N-VersionTMR and N-VersionMajority masks one fault, not a shared bugFault Tree AnalysisFault Tree AnalysisMinimal cut sets; AND multiplies, OR 1−ΠToken vs leaky bucketToken vs leaky buckettoken allows bursts; leaky smoothsBackpressureBackpressurebounded queue: block, drop or ask lessLatency vs throughputLatency vs throughputnear full load, queues blow up p99M/M/1 queueM/M/1 queueW = 1/(μ−λ): waits explode as ρ → 1Pooled queues M/M/cPooled queues M/M/cOne shared line beats separate linesMean Value AnalysisRk = Dk(1 + Qk(N−1)), row by rowDiscrete-event simulationDiscrete-event simulationPop earliest event, jump clock, run handlerSimulation Output AnalysisSimulation Output AnalysisCorrelated data: batch it or replicate itMonolith vs microservicesMonolith vs microservicesfunction call vs network callDistributed tracingDistributed tracingtraceparent links spans across servicesRate limit windowsRate limit windowsfixed window lets 2x burst at the edgeRetry, backoff and jitterRetry, backoff and jitterWait 2^n plus random, or retries stampedeHedged requestsHedged requestsSlow? Send a copy; take the first reply
This page on the Distributed Systems mind map · 100 pages in 10 branches · open it to see the whole map and test yourself in recall mode.