Understanding the M/M/1 queue calculator — concept and principle
The M/M/1 queue is the simplest model in queueing theory: requests arrive at random, one server handles them one at a time, and service times are random too. From just two numbers, the arrival rate λ and the service rate µ, it predicts how busy the server is, how many requests are in the system on average, and how long each one waits. It is used for routers and network links, web servers, call centres and checkout lines, and above all to show why systems slow down sharply as they approach full load.
How it is calculated
- Utilisation ρ = λ ÷ µ.
- Average number in system L = λ ÷ (µ − λ) = ρ ÷ (1 − ρ).
- Average time in system W = 1 ÷ (µ − λ).
- Average wait in queue Wq = λ ÷ (µ(µ − λ)) = W − 1/µ.
Rates are per second; times are shown in milliseconds. The model is only stable when λ < µ; otherwise the queue grows without limit.
The principle
"M/M/1" is Kendall notation: Markovian (Poisson) arrivals, Markovian (exponential) service times, one server, with first-come-first-served order and unlimited waiting room. Under these assumptions the probability of finding n requests in the system is (1 − ρ)ρ^n, and summing gives L = ρ/(1 − ρ). Little's law, L = λW, then converts the number in the system into time. Because of the 1 − ρ in the denominator, delay grows slowly at first and then explodes as ρ approaches 1.
Worked example
- Inputs: λ = 80 per second, µ = 100 per second.
- ρ = 80 ÷ 100 = 80%.
- L = 80 ÷ (100 − 80) = 4 requests on average.
- W = 1 ÷ 20 = 0.05 s = 50 ms.
- Wq = 80 ÷ (100 × 20) = 0.04 s = 40 ms. The remaining 10 ms is the average service time 1/µ.
- Check with Little's law: 80 × 0.05 = 4.
How to read the result
At 50% utilisation, time in system is twice the service time; at 80% it is 5 times; at 90%, 10 times; at 99%, 100 times. This is why capacity planners often aim for headroom rather than running links or servers near 100%. Compare W with your latency target to judge whether a service rate is sufficient.
Common mistakes
- Using a long-term average for λ when real traffic arrives in bursts.
- Applying M/M/1 to multi-server systems; those need M/M/c.
- Mixing units, such as requests per minute for λ and per second for µ.
Frequently asked questions
What does ρ = 1 mean?
The server is busy all the time and the queue grows without bound; the model has no steady state.
What is Little's law?
L = λW: the average number in a stable system equals arrival rate times average time spent in it. It holds very generally.
How do I get µ?
µ = 1 ÷ average service time. A 10 ms average service time gives µ = 100 per second.
Sources: Kleinrock, L., Queueing Systems, Volume 1: Theory (Wiley, 1975) · Little, J. D. C. (1961), A Proof for the Queuing Formula L = λW, Operations Research 9(3)