Skip to content
jtoghrul, home

Visual proofs

Little’s law

Performance · Intro

In any stable system, the average number of items inside equals the arrival rate times the average time each item spends inside: L = λW.

Try this

Keep 20 requests a second and raise the time inside from 250 ms to 1 s. Count the dots.

Why it matters

It sizes thread pools, connection pools and queues from two numbers you can measure, whatever the traffic looks like.

The proof

Watch the system for a long time T. Items arrive at rate λ, so about λT of them come through.

Add up, over all items, the time each spent inside: λT items × W each = λTW item-seconds.

The same total is the average number inside, L, times the length of the watch, T. So LT = λTW, and L = λW.

No assumption about the distribution of arrivals or service times is needed, only that the system is stable: what comes in eventually goes out.

Sources

  • A Proof for the Queuing Formula: L = λW, John D. C. Little, 1961