Tutorials › Stochastic Processes › Throughput and Flow Balance in Steady State

The M/M/1 Queue · Tutorial 639 of 994

Throughput and Flow Balance in Steady State

Learn to calculate stationary throughput from server utilization and to verify it independently using customer flow balance.

Intermediate 10 min read

What You'll Learn

  • Define throughput as the expected departure rate in a stationary M/M/1 queue.
  • Explain why the departure rate is the service rate multiplied by the probability the server is busy.
  • Derive the equality between stationary arrival and departure rates.
  • Use pathwise customer conservation to check expected-flow calculations.
  • Identify why the service rate alone is not the queue’s throughput.

Throughput in a Stable M/M/1 Queue

In an M/M/1 queue, customers arrive at rate \(\lambda\), and a single server completes service at rate \(\mu\) whenever the system is nonempty. The server is not busy all the time: when the system is empty, service capacity is unused. Consequently, the departure rate is not generally \(\mu\). In steady state it is \(\mu\) multiplied by the probability that the server is busy. Customer conservation gives a second way to check that rate: in steady state, the expected number of departures per unit time must equal the expected number of arrivals per unit time.

Consider a queue on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Let \(N_t\in\{0,1,2,\ldots\}\) be the number of customers in the system at time \(t\), \(A(t)\) the number of arrivals in \((0,t]\), and \(D(t)\) the number of departures in \((0,t]\). Arrivals form a Poisson process of rate \(\lambda\), and potential service completions form an independent Poisson process of rate \(\mu\); a potential completion removes a customer only if the system is nonempty. Assume \(0<\lambda<\mu\), and write \(\rho=\lambda/\mu\). For the stationary version used below, \(N_0\) has the stationary distribution and is independent of both future Poisson processes. This independence ensures that future increments are independent of the queue state at the start of each time interval.

Definition: The stationary throughput is the expected departure rate in the stationary queue, \(\mathbb{E}[D(t)]/t\) for \(t>0\). In a stationary M/M/1 queue it is constant in \(t\). The utilization is \(\rho=\lambda/\mu\), and the stationary probability that the server is busy is \(\mathbb{P}(N_t>0)\).

The stationary distribution of the stable M/M/1 queue, established in the earlier material on stationary probabilities, is \(\pi_n=(1-\rho)\rho^n\), \(n\geq 0\). It is normalized because \(\sum_{n\geq0}(1-\rho)\rho^n=1\) for \(0<\rho<1\). In particular, \(\mathbb{P}(N_t=0)=\pi_0=1-\rho\), so the server is busy with probability \(\rho\). We now justify carefully why multiplying this busy probability by \(\mu\) gives the departure rate.

Why the Busy Probability Determines the Departure Rate

Fix \(t>0\) and divide \((0,t]\) into \(m\) intervals of equal length \(h=t/m\). For an interval starting at time \(s\), let \(K\) be the total number of arrival and potential service events in that interval, and let \(Y\) be the number of potential service events there. Conditional on the queue state at \(s\), future increments are independent of that state. Thus \(Y\) has mean \(\mu h\), and the total event count \(K\) is Poisson with mean \(\theta=(\lambda+\mu)h\).

If \(K\leq1\), the number of actual departures in the interval is exactly \(Y\mathbf{1}_{\{N_s>0\}}\): with no event there is no departure; with one event, a service event causes a departure precisely when the queue was initially nonempty. If \(K\geq2\), the absolute difference between actual departures and \(Y\mathbf{1}_{\{N_s>0\}}\) is at most \(K\), since actual departures cannot exceed the number \(Y\) of potential service events. For integer \(K\geq2\), \(K\leq K(K-1)\). Therefore \(\mathbb{E}[K\mathbf{1}_{\{K\geq2\}}]\leq\mathbb{E}[K(K-1)]=\theta^2\), using the second factorial moment of a Poisson variable. This bounds the error on each interval by \(\theta^2\).

Theorem (Stationary throughput and flow balance): Suppose \(0<\lambda<\mu\) and the M/M/1 queue is in its stationary version, with \(N_0\) independent of both future Poisson processes. Then, for every \(t>0\), \(\mathbb{E}[D(t)]=\mu\rho t=\lambda t\). Also, for any initial distribution with \(\mathbb{E}[N_0]<\infty\), customer conservation gives \(\mathbb{E}[D(t)]=\mathbb{E}[N_0]+\lambda t-\mathbb{E}[N_t]\).

Proof. For the stationary claim, on each interval of length \(h=t/m\), the expected value of \(Y\mathbf{1}_{\{N_s>0\}}\) is \(\mu h\,\mathbb{P}(N_s>0)=\mu h\rho\). The independence of future increments from \(N_s\) justifies the product. The preceding bound shows that the expected number of departures on that interval differs from \(\mu h\rho\) by at most \((\lambda+\mu)^2h^2\). Summing over the \(m\) intervals, the difference between \(\mathbb{E}[D(t)]\) and \(\mu\rho t\) is at most \(m(\lambda+\mu)^2(t/m)^2=(\lambda+\mu)^2t^2/m\). Letting \(m\) tend to infinity makes this bound zero, so \(\mathbb{E}[D(t)]=\mu\rho t\). Since \(\rho=\lambda/\mu\), this is \(\lambda t\).

For the flow identity, every sample path satisfies \(N_t=N_0+A(t)-D(t)\): each arrival adds one customer and each departure removes one. If \(\mathbb{E}[N_0]<\infty\), then \(N_t\leq N_0+A(t)\), so \(N_t\) has finite expectation; also \(D(t)\leq N_0+A(t)\). Taking expectations is therefore valid, and \(\mathbb{E}[A(t)]=\lambda t\) gives the stated identity. In stationarity, \(N_t\) and \(N_0\) have the same distribution and finite mean, so their expectations cancel. This independently yields \(\mathbb{E}[D(t)]=\lambda t\), proving the stationary flow-balance statement as well. \(\square\)

The first equality in the theorem uses the service mechanism and the busy probability. The second equality is customer conservation. Their agreement is an important check: if a proposed steady-state calculation gives different arrival and departure rates, some probability, rate, or state definition has been mishandled.

Worked Example: A Queue with Arrival Rate Two-Thirds

Let \(\lambda=\tfrac23\) and \(\mu=1\). Check the stationary probabilities and compute throughput in two ways.

Here \(\rho=\lambda/\mu=\tfrac23\), so \(\pi_n=(1-\rho)\rho^n=\tfrac13(\tfrac23)^n\). These probabilities sum to \(\tfrac13\sum_{n\geq0}(\tfrac23)^n=\tfrac13\cdot3=1\). The empty probability is \(\pi_0=\tfrac13\), and the busy probability is \(1-\pi_0=\tfrac23\). The server-rate calculation gives \(\mu\mathbb{P}(N_t>0)=1\cdot\tfrac23=\tfrac23\).

Customer flow gives the same answer: in any interval of length \(t\), stationarity implies \(\mathbb{E}[N_t]=\mathbb{E}[N_0]\), while the expected arrivals are \(\lambda t=\tfrac23t\). Thus \(\mathbb{E}[D(t)]=\tfrac23t\), and \(\mathbb{E}[D(t)]/t=\tfrac23\). Both calculations agree with the arrival rate.

Worked Example: Checking Expected Flows Over Eight Time Units

Let \(\lambda=\tfrac34\) and \(\mu=\tfrac32\), and initialize the queue in stationarity. Compute the expected arrivals and departures over \(t=8\), then check the mean queue size.

The utilization is \(\rho=(\tfrac34)/(\tfrac32)=\tfrac12\), so the busy probability is \(\tfrac12\). The stationary departure rate is \(\mu\rho=(\tfrac32)(\tfrac12)=\tfrac34\). Hence \(\mathbb{E}[A(8)]=(\tfrac34)8=6\) and \(\mathbb{E}[D(8)]=(\tfrac34)8=6\).

The stationary mean number in the system is \(\rho/(1-\rho)=(\tfrac12)/(\tfrac12)=1\). Customer conservation therefore predicts \(\mathbb{E}[N_8]=1+6-6=1\), which matches the stationary mean. This check uses the flow identity, not a claim that the queue stays at one customer; only its expected size is unchanged.

Check: The server-based calculation gives \((\tfrac32)(\tfrac12)=\tfrac34\) departures per unit time, and the arrival calculation gives \(\tfrac34\) arrivals per unit time. Multiplying each by \(8\) gives \(6\) expected events of each type.

Worked Example: Separating Service Capacity from Throughput

Suppose \(\lambda=1\) and \(\mu=2\). Find the idle probability, busy probability, and stationary throughput, and explain why using \(\mu\) alone gives the wrong answer.

The utilization is \(\rho=1/2\). Thus the stationary idle probability is \(1-\rho=1/2\), and the busy probability is \(1/2\). The throughput is \(\mu\rho=2\cdot\tfrac12=1\) customer per unit time. The arrival rate is also \(1\), as required by steady-state flow balance.

If one incorrectly reports the service rate \(2\) as throughput, the calculation counts potential service capacity even during idle periods. The server is idle half the time, so only half of its potential completion rate produces departures: \(2\cdot\tfrac12=1\). The result is checked against the arrival rate, which is \(1\).

Common Mistake and Scope of the Balance

Common mistake: reporting \(\mu\) as the departure rate. For the queue in the last example, the incorrect calculation is “throughput \(=\mu=2\),” which would predict \(2t\) expected departures in an interval of length \(t\). The correction is to account for the empty state: the server is busy with probability \(1/2\), so expected departures are \(2(\tfrac12)t=t\). This agrees with the \(t\) expected arrivals. Service capacity is a rate conditional on the server being busy; throughput is the unconditional rate of actual departures.

The stationary equality of arrival and departure rates is an expectation statement. It does not say that the number of arrivals equals the number of departures on every sample path over a fixed interval: the difference is exactly the change \(N_t-N_0\). Nor should the stationary expectation identity be applied carelessly to an initial distribution with infinite mean. The pathwise conservation equation still holds, but taking expectations can then involve undefined differences. The finite-mean assumption in the theorem ensures that the expectations in the transient flow identity are well-defined and finite.

Check Your Understanding

For each question, distinguish the service capacity, the busy probability, and the actual departure rate.

  1. For \(\lambda=\tfrac45\) and \(\mu=1\), find \(\rho\), the stationary empty probability, and the throughput. Check the throughput against the arrival rate.
  2. If a stable stationary M/M/1 queue has busy probability \(\tfrac35\) and service rate \(\mu=2\), what is its throughput? What arrival rate must it have?
  3. State the pathwise customer-conservation identity using \(N_0\), \(A(t)\), \(D(t)\), and \(N_t\). Which finite-moment assumption allows its expectation form to be used as written?
  4. In a stationary queue, why does customer conservation imply equal expected arrival and departure counts over \((0,t]\)?
  5. Why is independence of \(N_0\) from both future Poisson processes relevant when computing expected departures from the stationary busy probability?