Learn
Lesson · Queues and Utilisation · Shedding and overload

Bounded Queues and Loss

A buffer of K converts waiting into dropping. The blocking probability is π_K = (1 − ρ)ρ^K/(1 − ρ^(K+1)), the wait can never exceed about K·S, and the rate that actually enters the system is λ(1 − π_K) — which is the rate Little's Law must be given, and the one most readers forget to use.

π_K = (1 − ρ)ρ^K/(1 − ρ^(K+1)) the fraction of TIME the system is full loss = π_K by PASTA, because arrivals here are Poisson admitted rate λ_eff = λ(1 − π_K) the rate that crosses the boundary W = L/λ_eff Little's Law takes the ADMITTED rate λ = 4/5, μ = 1, K = 4: π_K = 256/2101 ≈ 12.2% W = 821/369 ≈ 2.22 s not 4105/2101 ≈ 1.95 s
A truncated queue, and the rate that actually enters it

Core ideas

What this lesson establishes

A bounded buffer is the one control on this course that makes the system worse on purpose, and the arithmetic has to keep up with that.

1

A bound converts waiting into dropping

The unbounded queue of “The M/M/1 Queue” makes everyone wait as long as it takes. Cap it at K and arrivals that find it full are refused instead: the system stops trading latency for completeness and starts trading completeness for latency. Which of the two is the better failure depends on the application, and it is a decision rather than a default.

2

The cap on the queue is a cap on the latency

At most K jobs can be ahead of you, each taking about S, so the time in the system cannot exceed roughly K·S however hard the offered load pushes. That is the actual argument for a small buffer, and the argument against a large one: a buffer big enough never to drop anything is a buffer big enough to hold an unusable amount of waiting.

3

L = λW needs the rate that crosses the boundary

A lossy system admits λ(1 − π_K) and refuses the rest. Little's Law was proved by counting the customers who actually entered, so it is the admitted rate that belongs in it. Using the offered rate produces a W that is too small by exactly the factor 1 − π_K, and the error is invisible unless both numbers are printed.

The material

Truncating the queue

The blocking probability, the two arrival rates, the latency cap, and the buffer a loss target actually needs.

Definition · M/M/1/K

The M/M/1 model with room for at most K in the system, the one in service included. An arrival that finds K present is blocked and lost. The states 0 to K carry the same geometric ratios as before, normalised over a finite sum, so πₙ = (1 − ρ)ρⁿ/(1 − ρ^(K+1)) and in particular π_K = (1 − ρ)ρ^K/(1 − ρ^(K+1)).

One step in that definition deserves naming rather than sliding past. π_K is the fraction of time the system is full; the loss is the fraction of arrivals that find it full. Those are two different quantities, and they are equal here because the arrivals are Poisson: a Poisson arrival sees the system exactly as an outside observer sampling at a random instant would. That property is called PASTA — Poisson arrivals see time averages — and it is an assumption of this model rather than a general truth about queues.

The discrete-time chain of “Why Queues Form at ρ < 1” does not have it. Under the late-arrival convention a departure resolves before the arrival in the same slot, so an arrival that meets a full system is still admitted whenever a completion happened first, and its blocking probability is strictly smaller than that chain's π_K. The two statements look alike and are not the same statement; the discrete one is Operations Research, markov-chains-decisions-and-queues/queues-in-discrete-time, and the one on this page is the continuous-time one.

One consequence is worth stating on its own: this chain settles at every ρ, including ρ ≥ 1. There are finitely many states and the queue cannot grow past K, so there is always a stationary distribution — at ρ = 1 every state is equally likely, and with K = 4 that makes the blocking probability exactly 1/5. Overload in a bounded system is not unbounded growth; it is loss.

λ = 4/5 / s μ = 1 / s ρ = 4/5 K = 4 π_K = (1/5)(256/625) ÷ (1 − 1024/3125) = 256/2101 ≈ 12.2% λ_eff = λ(1 − π_K) = (4/5)(1845/2101) = 1476/2101 ≈ 0.703 / s L = Σ n πₙ = 3284/2101 ≈ 1.563 W = L/λ_eff = 3284/1476 = 821/369 ≈ 2.22 s correct W = L/λ = 3284/2101 ÷ (4/5) ≈ 1.95 s wrong the ratio between them is exactly 1/(1 − π_K) = 2101/1845

The wrong line is not a rounding difference; it is 12% low, and it is low in the flattering direction. A team that computes it is reporting a response time that no admitted request experiences, on a system that is also dropping one arrival in eight. The lab prints both values side by side and labels them, because the only reliable defence against this mistake is seeing the two numbers together.

The boundary form of the rule — that the rate in L = λW is whatever crosses into the boundary you drew — is Operations Research, markov-chains-decisions-and-queues/littles-law, which cites this path's proof. A dropped arrival never crossed the boundary, so it belongs in neither λ nor W.

Sizing the buffer

Loss falls quickly with K, and the latency cap rises with it just as quickly, so the two constraints pull in opposite directions and the buffer size is where they meet.

λ = 4/5, μ = 1, so S = 1 s K = 4 π_K ≈ 12.2% latency cap ≈ 4 s K = 14 π_K ≤ 1% latency cap ≈ 14 s K = 24 π_K ≤ 0.1% latency cap ≈ 24 s for comparison, the unbounded queue at the same ρ: no loss at all mean W = S/(1 − ρ) = 5 s, unbounded tail

That table is bufferbloat in four lines. Pushing the loss from 12% to 0.1% costs a latency cap of twenty-four service times, and a queue that deep delivers work whose answer stopped being wanted twenty seconds ago. The interesting question is never “how do we stop dropping” but “which of dropping and delaying is the cheaper failure for this request”.

For an interactive request with a client timeout, delay beyond the timeout is loss with extra steps: the work is done, the resources are spent, and nobody is listening. A short buffer refuses the request early enough for the client to do something about it. For a batch pipeline with no reader waiting, the trade runs the other way and a deep buffer is exactly right.

Note also what a finite buffer does to the numbers of the previous lessons. L and W both fall, because the worst states have been removed from the distribution; throughput falls too, by the blocked fraction; and the response-time curve no longer has an asymptote at ρ = 1, because there is nothing left for it to blow up into.

Interactive

Bounded queues and loss

πₖ, the admitted rate, and the two W values it separates

Bounded queues and lossa buffer of K turns waiting into dropping — and changes which λ Little's Law takes
πnblockedadmitted ratethe wrong W

Method

Sizing a bounded queue

Two constraints, pulling opposite ways, and one rate that has to be the right one.

1

Compute ρ, and do not require it to be below one

A finite buffer settles at any load. Above ρ = 1 the answer is simply that most arrivals are refused, which is a legitimate operating point and not a failure of the model.

2

Get π_K and the admitted rate

π_K = (1 − ρ)ρ^K/(1 − ρ^(K+1)), then λ_eff = λ(1 − π_K). Write the admitted rate down next to the offered one so that the two never get confused later.

3

Compute L, then W from the admitted rate

W = L/λ_eff. If you have computed L/λ, you have computed the wait for a population that includes requests which never entered the system.

4

Read the latency cap off K

About K·S. This is the number the buffer was bought for, and it is the number to compare against a client timeout.

5

Choose K from a loss target, then sanity-check the cap

Walk K up until π_K meets the target, then look at K·S and ask whether anybody still wants an answer that late. If not, the target was the wrong constraint.

Loss, caps and the right λ

Score 0 / 0

A buffer of four at ρ = 4/5, and the two waiting times

The same load as the M/M/1 lesson, with room for four instead of room for everyone. Both W values are computed so that the wrong one is recognisable.

λ = 4/5 / s μ = 1 / s S = 1 s ρ = 4/5 K = 4 π_K = (1 − ρ)ρ⁴/(1 − ρ⁵) = (1/5)(256/625)/(1 − 1024/3125) = 256/2101 ≈ 12.2% λ_eff = (4/5)(1 − 256/2101) = 1476/2101 ≈ 0.703 / s L = 3284/2101 ≈ 1.563 W = L/λ_eff = 3284/1476 = 821/369 ≈ 2.22 s correct W = L/λ ≈ 1.95 s wrong, by 1/(1 − π_K) latency cap ≈ K·S = 4 s unbounded at the same ρ: W = S/(1 − ρ) = 5 s, and no cap at all

The buffer bought a hard ceiling of about four seconds in place of a mean of five with an unbounded tail, and it paid for it by refusing one arrival in eight. Whether that is a good trade is a question about the client, not about the queue.

The two W lines differ by exactly 1/(1 − π_K) = 2101/1845. That factor is the whole misconception: it is small enough to look like noise and always in the direction that makes the system look better than it is.

For a faded rehearsal, keep λ = 4/5 and μ = 1 and set K = 2. The supplied first move is that π_K will be much larger than 12%, so the admitted rate falls further from the offered one. Compute both W values and the size of the factor between them.

Common mistakes

1
Using Little's Law with the offered rateThe rate that crosses into a lossy system is λ(1 − π_K), not λ. “Little’s Law from a Trace” proved the identity on a trace of arrivals that actually entered, and a dropped arrival is not one of them. On the worked example the two answers are 2.22 and 1.95 seconds, and the wrong one is the smaller — which is why it survives review.
2
Believing a bigger buffer is always betterEvery unit of buffer is a unit of potential waiting, and the cap it removes is the only guarantee the buffer was providing. A buffer sized for 0.1% loss holds twenty-four service times of work, and if the client gave up after five of them that buffer is manufacturing expensive, unwanted answers.
3
Assuming the queue needs ρ < 1 to settleThat condition belongs to the unbounded model. A truncated chain has finitely many states and settles at every load; at ρ = 1 with K = 4 the states are uniform and exactly 1/5 of arrivals are blocked. Overload in a bounded system shows up as loss, not as growth.

Check your understanding

✓
Finish when the first thing you ask about a lossy system is which arrival rate the numbers used.

You should be able to compute π_K, the admitted rate, L and both W values, choose a K from a loss target, state the latency cap that K implies, and say why the truncated chain settles at every ρ.

Note: A bounded buffer refuses work only once the queue is full. “Token Buckets and Rate Limiting” refuses it earlier and on purpose, by an explicit rule about how much may be admitted in any window — and the rule is not the one most people think they are enforcing.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.