Queueing theory

M/M/c queue calculator.

Give an arrival rate, a service time and a number of servers. See utilization, how often a job waits, the average wait and the queue length.

Utilization rho = lambda / (c x mu); average wait Wq = C(c, a) / (c x mu - lambda). C is the Erlang C probability of waiting. The queue is stable only while rho is below 1.

Advertisement

Your numbers

Your numbers
per sec
ms

Service rate per server = 1000 / service time.

ms

Result

Worked example

Jobs arrive at 15 per second and each takes 500 ms (mu = 2 per second) on one of 10 servers. Offered load is 7.5 erlangs and utilization is 75%. The chance a job has to wait is 30.7%, the average wait in the queue is 61.3 ms and total time in the system is 561.3 ms. For a single server with lambda 8 and mu 10 per second the same formulas give a 100 ms service time, 400 ms wait and 500 ms total (L = 4 in system).

How it works

With offered load a = lambda / mu, the Erlang C probability C(c, a) comes from the Erlang B recurrence: C = B / (1 - (a / c) x (1 - B)). Then Wq = C / (c x mu - lambda), W = Wq + 1 / mu, Lq = lambda x Wq and L = lambda x W (Little's law). The chance a wait exceeds t is C x e^(-(c x mu - lambda) x t).

Assumptions. Poisson arrivals, exponential service times, c identical servers, one first-come first-served queue with unlimited room. Real service times are rarely exponential, and bursts make waits longer than this model predicts. At 100% utilization or above the queue grows without limit, so the tool refuses.

FAQ

What does M/M/c mean?

The first M is Markovian (Poisson) arrivals, the second M is Markovian (exponential) service times, and c is the number of identical servers sharing one queue.

Why does the average wait explode near full utilization?

The wait scales with 1 / (c x mu - lambda), the spare capacity. As lambda approaches c x mu, spare capacity goes to zero and the wait grows without bound.

What happens when utilization reaches 100%?

The model has no steady state: arrivals meet or exceed total service capacity, so the queue grows without limit. The tool refuses those inputs and tells you the utilization it computed.

Can I use this for web servers or support desks?

As a first estimate, yes. Check that arrivals are roughly random and that service times vary like an exponential, then confirm with measurements.

Sources

Retrieved

Formulas are standard published results; the cited pages state them. Inputs, defaults and rounding are this tool's own. Runs entirely in your browser. Nothing you type is sent or stored.

Scope

The M/M/c model is a simplification. Measure your own arrival and service distributions before committing capacity.

Advertisement
Advertisement