Queues

M/M/c · one line or a line each Transformer Learning

A store with several registers. People arrive at rate λ, and each register, while someone is there, checks them out at rate μ. Utilization ρ = λ/(cμ) is the fraction of time each register is busy. It is the same whether there is one line or a line at each register. The wait is not. A line at each register is c separate M/M/1 queues: you stay in the line you walked up to, so a register can sit idle while another line still has people. One line feeding every register is an M/M/c queue: the next free register takes the next person. Click a symbol. The store marks the thing that symbol names.

Utilization

= / ( × )

The rates are averages

Arrivals and checkouts are messy. λ is how many people arrive per unit time, on average, so the mean gap is 1/λ. μ is how many checkouts one register finishes per unit time, on average, so the mean checkout is 1/μ. The bars are this store. The curve is the exponential those averages imply. The dash is the mean.

time between arrivals checkout time dashed is the mean

Two layouts, same people

Both sides get the same arrivals and the same checkout times. On the left each person picks a register at random and stays. On the right there is one line, and the next free register takes the next person.

waiting at a register idle while another line waits
Wq = / ( × ) = —

Wq = / ( × − ) = —

People waiting

How many people are standing in line. Orange is every separate line added together. Teal is the one shared line. The dashed line is that layout’s steady mean, Lq, drawn while ρ < 1.

a line at each register one line dashed is the steady mean

Why the wait gets long

Mean wait Wq against utilization ρ. Both curves climb without a bound as ρ reaches 1. The one shared line stays under the separate lines the whole way. The dots are this store.

Wq, a line each Wq, one line

Exponential gaps between arrivals, exponential checkout times. The waits are the steady means. The picture is one sample path of both layouts.