From Rates to Performance Measures
An M/M/1 performance calculation starts with two rates: arrivals occur at rate \(\lambda\), and service completions occur at rate \(\mu\) whenever the server is busy. These rates describe a single-server queue with Poisson arrivals, independent exponential service times, an unlimited waiting room, and first-come, first-served (FCFS) service. The first question is whether the queue has a stationary distribution. If it does, a small set of formulas gives occupancy probabilities, utilization, mean queue length, and delay. A waiting-time tail then answers a probability question about an individual arriving customer.
Let \((X_t)_{t\ge0}\) be the number of customers in the system at time \(t\), on a probability space \((\Omega,\mathcal{F},\mathbb{P})\), with state space \(S=\{0,1,2,\ldots\}\) and continuous time \(t\ge0\). From state \(0\), the process jumps to \(1\) at rate \(\lambda\). From state \(n\ge1\), it jumps to \(n+1\) at rate \(\lambda\) and to \(n-1\) at rate \(\mu\). Assume \(\lambda>0\) and \(\mu>0\). The generator has \(q_{00}=-\lambda\), and for \(n\ge1\), \(q_{nn}=-(\lambda+\mu)\), with the off-diagonal rates just specified; each generator row sums to zero.
Rates must be expressed in the same time units before they are compared or used in a formula. A stationary calculation also requires \(\rho<1\), equivalently \(\lambda<\mu\). Under that condition, the stationary probabilities and performance measures are
and, by flow balance or Little's law,
Here \(\pi_n\) is the stationary probability of \(n\) customers in the system. The distinction between \(W_q\) and \(W\) matters: \(W_q\) excludes service, whereas \(W\) includes it. In a stable system, the long-run throughput equals \(\lambda\), so these mean-time identities use the arrival rate \(\lambda\).
Why the Stationary Formulas Apply
Proof. Suppose first that \(\pi=(\pi_0,\pi_1,\ldots)\) is a stationary probability distribution. For any \(n\ge0\), consider the set of states \(\{0,\ldots,n\}\). The only transition out of this set is an arrival from state \(n\), at rate \(\lambda\); the only transition into it from outside is a service completion from state \(n+1\), at rate \(\mu\). Stationarity makes the net flow across this boundary zero. Thus \(\lambda\pi_n=\mu\pi_{n+1}\), or \(\pi_{n+1}=\rho\pi_n\). Repeated substitution gives \(\pi_n=\pi_0\rho^n\) for every \(n\ge0\). If \(\rho\ge1\), these terms do not have a finite sum, so they cannot be the probabilities of a stationary distribution. If \(\rho<1\), normalization requires \(1=\sum_{n=0}^{\infty}\pi_n=\pi_0\sum_{n=0}^{\infty}\rho^n=\pi_0/(1-\rho)\), so \(\pi_0=1-\rho\). This produces a probability distribution, and its adjacent-state flow equations hold. For each state, those equations balance all incoming and outgoing stationary rates, so \(\pi Q=0\); hence the distribution is stationary. The recurrence \(\pi_{n+1}=\rho\pi_n\) and normalization also show it is unique. \(\square\)
The formulas for \(L\) and \(L_q\) follow from this distribution. For \(0\le\rho<1\), the geometric series gives \(\sum_{n\ge0}\pi_n=1\). Differentiating \(\sum_{n\ge0}\rho^n=1/(1-\rho)\) for \(\rho<1\) gives \(\sum_{n\ge0}n\rho^n=\rho/(1-\rho)^2\). Therefore \(L=\sum_{n\ge0}n\pi_n=\rho/(1-\rho)\). The queue excludes one customer when the system is nonempty, so \(L_q=L-\mathbb{P}(X_t\ge1)=L-\rho=\rho^2/(1-\rho)\). For a stable queue, Poisson arrivals see the stationary time-average occupancy (PASTA), and Little's law gives \(L_q=\lambda\mathbb{E}[W_q]\) and \(L=\lambda\mathbb{E}[W]\). These are the standard PASTA and Little's law results; their general proofs are not repeated here.
Proof. By PASTA, an arriving customer sees \(n\) customers in the system with probability \(\pi_n=(1-\rho)\rho^n\). If \(n=0\), the customer waits zero time. If \(n\ge1\), FCFS service and the memoryless property of exponential service imply that the customer's waiting time is the sum of \(n\) independent exponential service times of rate \(\mu\). Its density at \(t>0\) is \(\mu^n t^{n-1}e^{-\mu t}/(n-1)!\). Mixing over \(n\ge1\), the density of the positive part of \(W_q\) is $$ \sum_{n=1}^{\infty}(1-\rho)\rho^n \frac{\mu^n t^{n-1}e^{-\mu t}}{(n-1)!} =(1-\rho)\rho\mu e^{-\mu t} \sum_{r=0}^{\infty}\frac{(\rho\mu t)^r}{r!} =\rho(\mu-\lambda)e^{-(\mu-\lambda)t}. $$ The equality uses the exponential series and \((1-\rho)\mu=\mu-\lambda\). Integrating this density from \(t\) to infinity gives \(\mathbb{P}(W_q>t)=\rho e^{-(\mu-\lambda)t}\) for \(t\ge0\). At \(t=0\), this gives \(\mathbb{P}(W_q>0)=\rho\), which also follows because a customer waits exactly when the system is nonempty. \(\square\)
Worked Performance Calculations
Worked Example: A Stable Queue with All Measures
Suppose arrivals occur at \(\lambda=2\) customers per hour and service completions at \(\mu=3\) customers per hour. Find stability, utilization, the stationary occupancy probabilities, the mean queue length, both mean times, and the probability an arriving customer waits more than one hour.
The rates use the same time unit. The traffic intensity is \(\rho=\lambda/\mu=2/3<1\), so the queue is stable. The stationary probability of state \(n\) is \(\pi_n=(1-2/3)(2/3)^n=(1/3)(2/3)^n\). In particular, \(\pi_0=1/3\), \(\pi_1=2/9\), and \(\pi_2=4/27\). The utilization is \(2/3\), and the idle probability is \(1/3\). The probability of at least three customers in the system is \(\rho^3=(2/3)^3=8/27\).
The mean system size is \(L=\rho/(1-\rho)=(2/3)/(1/3)=2\) customers. The mean queue length is \(L_q=\rho^2/(1-\rho)=(4/9)/(1/3)=4/3\) customers. The mean queue wait is \(\mathbb{E}[W_q]=L_q/\lambda=(4/3)/2=2/3\) hour. The mean total time is \(\mathbb{E}[W]=L/\lambda=2/2=1\) hour; equivalently, \(1/(\mu-\lambda)=1/(3-2)=1\) hour.
For the waiting-time tail at \(t=1\) hour, \(\mathbb{P}(W_q>1)=(2/3)e^{-(3-2)1}=2/(3e)\). Check: The probabilities sum to \(\sum_{n\ge0}(1/3)(2/3)^n=(1/3)/(1-2/3)=1\). Also, \(\lambda\mathbb{E}[W_q]=2(2/3)=4/3=L_q\), and \(\lambda\mathbb{E}[W]=2(1)=2=L\).
Worked Example: A Different Stable Load
Now let \(\lambda=3\) customers per hour and \(\mu=4\) customers per hour. Find the probability the system is empty, the mean number waiting, the mean total time, and the probability an arriving customer waits more than half an hour.
Here \(\rho=3/4<1\), so the stationary distribution exists. The empty probability is \(1-\rho=1/4\), and \(\pi_n=(1/4)(3/4)^n\). The mean queue length is \(L_q=\rho^2/(1-\rho)=(9/16)/(1/4)=9/4\) customers. The mean total time is \(\mathbb{E}[W]=1/(\mu-\lambda)=1/(4-3)=1\) hour. The mean queue wait, for comparison, is \(L_q/\lambda=(9/4)/3=3/4\) hour.
At \(t=1/2\) hour, the waiting-time tail is \(\mathbb{P}(W_q>1/2)=(3/4)e^{-(4-3)(1/2)}=(3/4)e^{-1/2}\). Check: The mean waiting time gives \(\lambda\mathbb{E}[W_q]=3(3/4)=9/4=L_q\). The tail at zero is \(3/4\), the probability the system is nonempty, since \(\mathbb{P}(W_q>0)=\rho=3/4\).
Worked Example: Detecting an Unstable Queue
Suppose \(\lambda=5\) customers per hour and \(\mu=4\) customers per hour. Can the stationary performance formulas be used?
The traffic intensity is \(\rho=5/4>1\), so the queue is not stable. If a stationary distribution existed, the boundary flow equations would require \(\pi_{n+1}=(5/4)\pi_n\), hence \(\pi_n=\pi_0(5/4)^n\). If \(\pi_0=0\), this recurrence forces every \(\pi_n=0\), contradicting total probability one. If \(\pi_0>0\), the terms grow and cannot sum to one. Thus no stationary distribution exists, and stationary occupancy probabilities, utilization-as-a-stationary-busy-fraction, and stationary mean delay cannot be reported using the stable formulas.
Check: The candidate terms cannot even tend to zero: for \(\pi_0>0\), \(\pi_0(5/4)^n\ge\pi_0\) for every \(n\). This directly contradicts the necessary condition that terms of a convergent probability sum tend to zero.
Interpretation and Common Pitfalls
These calculations describe a stationary queue, not every possible initial condition at every time. In particular, an arrival rate larger than or equal to the service rate invalidates the stationary formulas; inserting \(\rho\ge1\) into a geometric-series expression does not produce a probability distribution. The waiting-time tail also has a specific interpretation: it is the time until service begins, under stationary arrivals and FCFS, not the time until service is completed.
A common error is to call \(L\) the mean queue length and then use it to calculate the mean waiting time before service. For the first example, that mistake would give \(L/\lambda=2/2=1\) hour as the mean queue wait. But \(L\) counts the customer in service as well as those waiting. The correction is \(L_q/\lambda=(4/3)/2=2/3\) hour; the one-hour value is the mean total time in the system. A second check is \(\mathbb{E}[W]=\mathbb{E}[W_q]+1/\mu=2/3+1/3=1\) hour, where \(1/\mu=1/3\) hour is the mean service time.
For a reliable calculation, keep the quantities distinct: \(\rho\) is utilization, \(L_q\) counts those waiting, \(L\) counts everyone in the system, \(W_q\) excludes service, and \(W\) includes service. Check stability before computing stationary measures, and use the strict tail event \(W_q>t\) when applying the waiting-time formula.
Check Your Understanding
Use rates in matching time units, and state whether each queue is stable before calculating stationary quantities.
- For \(\lambda=1\) and \(\mu=2\) customers per minute, find \(\rho\), the idle probability, and the probability of at least two customers in the system.
- For \(\lambda=2\) and \(\mu=5\) customers per hour, calculate \(L_q\) and \(\mathbb{E}[W_q]\). Verify their relation using Little's law.
- In a stable M/M/1 queue, what does \(L\) count that \(L_q\) does not?
- For a stable queue with \(\lambda=1\) and \(\mu=3\) per hour, write the formula for \(\mathbb{P}(W_q>t)\), and evaluate it at \(t=1\) hour.
- Explain why the recurrence \(\pi_{n+1}=\rho\pi_n\) cannot define stationary probabilities when \(\rho\ge1\).