Tutorials › Stochastic Processes › Comparing Service-Time Variability at Fixed Traffic Intensity

M/G/1 Queues and Networks · Tutorial 678 of 994

Comparing Service-Time Variability at Fixed Traffic Intensity

Use the Pollaczek–Khinchine formula to quantify how service-time variability changes mean waiting at fixed traffic intensity.

Advanced 10 min read

What You'll Learn

  • State the stability and moment assumptions behind the M/G/1 mean-waiting-time formula
  • Express mean waiting time using the service-time mean and variance
  • Compare exponential and deterministic service at equal means and traffic intensities
  • Calculate waiting times for a two-point service distribution
  • Identify when equal traffic intensity alone is not enough for a fair comparison
  • Distinguish conclusions about mean waiting from claims about the full waiting-time distribution

Why Service-Time Variability Matters

Two single-server queues can have the same arrival rate, the same average service duration, and therefore the same traffic intensity, yet have different average waits. The Pollaczek–Khinchine formula makes the source of that difference precise: for an M/G/1 queue, mean waiting time depends on the second moment of service time. Since the mean service time is held fixed in this comparison, differences in the second moment are exactly differences in service-time variance.

We consider a first-come, first-served, single-server queue. Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Arrivals are a Poisson process \((N_t)_{t\ge0}\), with time index \(t\ge0\), state space \(\mathbb{Z}_{\ge0}\), and rate \(\lambda>0\). Customer service times \(S_1,S_2,\ldots\) are independent and identically distributed nonnegative random variables, independent of the arrival process. Write \(S\) for a generic service time, \(m=\mathbb{E}[S]\), and \(\sigma^2=\operatorname{Var}(S)\). The queue length \(Q_t\) is also indexed by \(t\ge0\) and takes values in \(\mathbb{Z}_{\ge0}\); for general service times, \(Q_t\) alone need not be a Markov process. Let \((\mathcal{F}_t)_{t\ge0}\) represent the history of arrivals and service in the queue up to time \(t\).

Assume \(m>0\), \(\lambda m<1\), and \(\mathbb{E}[S^2]<\infty\). The traffic intensity is \(\rho=\lambda m\); the inequality \(\rho<1\) is the stability condition for the stationary M/G/1 setting considered here. Let \(W_q\) denote a stationary customer's waiting time before service begins, excluding that customer's own service time. Its mean is taken in the stationary queue.

Formula (Pollaczek–Khinchine mean waiting time): For a stable FCFS M/G/1 queue with Poisson arrival rate \(\lambda>0\), independent nonnegative i.i.d. service times \(S_k\) with \(0<m=\mathbb{E}[S]\), and finite second moment, the stationary mean queueing wait is $$ \mathbb{E}[W_q]=\frac{\lambda\mathbb{E}[S^2]}{2(1-\rho)},\qquad \rho=\lambda m<1. $$ The formula concerns waiting before service, not total time in the system. It is the Pollaczek–Khinchine mean-waiting-time formula derived in the earlier material on M/G/1 queues.

The key identity is \(\mathbb{E}[S^2]=m^2+\sigma^2\). If \(m\) and \(\lambda\) are fixed, then \(\rho\) is fixed as well. Substitution gives a direct decomposition of the mean wait into a part determined by the common mean service and a part determined by variability.

$$ \mathbb{E}[W_q] =\frac{\lambda(m^2+\sigma^2)}{2(1-\lambda m)} =\frac{\rho m}{2(1-\rho)}\left(1+\frac{\sigma^2}{m^2}\right). $$

The coefficient of \(\sigma^2\) in the first expression is positive whenever \(\lambda>0\) and \(\rho<1\). Thus, at equal arrival rate and service mean, a larger service-time variance produces a larger mean waiting time. The same comparison can be made at fixed \(\rho\) and fixed \(m\), since then \(\lambda=\rho/m\) is also fixed. The coefficient of variation squared, \(\operatorname{CV}^2=\sigma^2/m^2\), gives a dimensionless way to state the variability contribution.

Exact Comparison at Fixed Traffic Intensity

Theorem: Consider two stable FCFS M/G/1 queues with the same arrival rate \(\lambda>0\) and the same positive service-time mean \(m\). Suppose each service-time distribution has a finite second moment. If their service-time variances are \(\sigma_1^2\) and \(\sigma_2^2\), and their stationary mean waiting times are \(w_1\) and \(w_2\), then $$ w_1-w_2=\frac{\lambda(\sigma_1^2-\sigma_2^2)}{2(1-\lambda m)}. $$ In particular, \(w_1\ge w_2\) if and only if \(\sigma_1^2\ge\sigma_2^2\), and equality of the variances implies equality of the mean waits.

Proof. Both queues have the same traffic intensity \(\rho=\lambda m<1\). By the Pollaczek–Khinchine formula, \(w_r=\lambda\mathbb{E}[S_r^2]/(2(1-\rho))\) for \(r=1,2\). For each service time, \(\mathbb{E}[S_r^2]=m^2+\sigma_r^2\). Subtracting the two formulas cancels the common \(m^2\) term and yields \(w_1-w_2=\lambda(\sigma_1^2-\sigma_2^2)/(2(1-\lambda m))\). The denominator and \(\lambda\) are positive, so the sign of the difference is exactly the sign of \(\sigma_1^2-\sigma_2^2\). This proves both directions of the ordering claim and the equality statement. \(\square\)

Corollary: Among nonnegative service-time distributions with fixed mean \(m>0\), deterministic service has the smallest possible M/G/1 mean waiting time, provided the queue is stable. Equality with the deterministic-service wait occurs only when service time equals \(m\) with probability one.

Proof. For any service time \(S\) with mean \(m\), \(\operatorname{Var}(S)=\mathbb{E}[(S-m)^2]\ge0\), since the squared quantity is nonnegative. It is zero exactly when \((S-m)^2=0\) with probability one, or equivalently \(S=m\) with probability one. The mean-waiting formula expressed using variance is increasing in \(\sigma^2\), so its minimum occurs at variance zero. Deterministic service attains that value, and the equality condition just established shows that no other service-time law attains it. \(\square\)

Worked Comparisons

Worked Example: Exponential Versus Deterministic Service

Compare an M/M/1 queue with an M/D/1 queue when both have arrival rate \(\lambda=\tfrac14\) and mean service time \(m=2\). The traffic intensity is \(\rho=\lambda m=\tfrac14\cdot2=\tfrac12<1\), so both queues satisfy the stability condition.

For exponential service with mean \(2\), the variance is \(2^2=4\). Therefore \(\mathbb{E}[S^2]=m^2+\sigma^2=4+4=8\). The Pollaczek–Khinchine formula gives $$ \mathbb{E}[W_q] =\frac{(\tfrac14)(8)}{2(1-\tfrac12)} =\frac{2}{1} =2. $$

For deterministic service \(S=2\), the variance is \(0\), so \(\mathbb{E}[S^2]=2^2=4\). Thus $$ \mathbb{E}[W_q] =\frac{(\tfrac14)(4)}{2(1-\tfrac12)} =\frac{1}{1} =1. $$

Check: The theorem predicts the difference as \(\frac{(\tfrac14)(4-0)}{2(1-\tfrac12)}=1\). The calculated difference is \(2-1=1\), as required. The exponential-service mean wait is twice the deterministic-service mean wait here; that ratio follows from these particular variances and should not be assumed for arbitrary service distributions.

Worked Example: A Two-Point Service Distribution

Keep \(\lambda=\tfrac14\) and \(m=2\), but now let service time equal \(1\) or \(3\), each with probability \(\tfrac12\). This is a nonnegative service-time distribution with the same mean and traffic intensity as in the previous comparison. Its mean is \(\mathbb{E}[S]=\tfrac12(1)+\tfrac12(3)=2\), and its second moment is $$ \mathbb{E}[S^2]=\tfrac12(1^2)+\tfrac12(3^2)=\tfrac12+\tfrac92=5. $$

The variance is \(5-2^2=1\). The mean wait is therefore $$ \mathbb{E}[W_q] =\frac{(\tfrac14)(5)}{2(1-\tfrac12)} =\frac{\tfrac54}{1} =\frac54. $$

Check: The variance comparison with deterministic service predicts an increase of \(\frac{(\tfrac14)(1-0)}{2(1-\tfrac12)}=\tfrac14\). The computed wait exceeds the deterministic value \(1\) by \(\tfrac54-1=\tfrac14\). It is also below the exponential-service value \(2\), consistent with its variance \(1\) being less than the exponential variance \(4\).

Worked Example: The Same Utilization at a Different Service Scale

Consider queues with \(m=4\), \(\rho=\tfrac23\), and hence \(\lambda=\rho/m=(\tfrac23)/4=\tfrac16\). Compare deterministic service, exponential service, and a two-point service time that is \(2\) or \(6\), each with probability \(\tfrac12\). Each has mean \(4\), so each queue has the stated traffic intensity \(\rho=\lambda m=\tfrac16\cdot4=\tfrac23<1\).

For deterministic service, \(\mathbb{E}[S^2]=4^2=16\), giving $$ \mathbb{E}[W_q]=\frac{(\tfrac16)(16)}{2(1-\tfrac23)} =\frac{\tfrac83}{\tfrac23}=4. $$

For exponential service with mean \(4\), \(\operatorname{Var}(S)=4^2=16\), so \(\mathbb{E}[S^2]=16+16=32\). Hence $$ \mathbb{E}[W_q]=\frac{(\tfrac16)(32)}{\tfrac23} =\frac{\tfrac{16}{3}}{\tfrac23}=8. $$

For the two-point law, the mean is \(\tfrac12(2)+\tfrac12(6)=4\), and its second moment is \(\tfrac12(2^2)+\tfrac12(6^2)=2+18=20\). Thus $$ \mathbb{E}[W_q]=\frac{(\tfrac16)(20)}{\tfrac23} =\frac{\tfrac{10}{3}}{\tfrac23}=5. $$

Check: The service variances are \(0\), \(16\), and \(20-4^2=4\), respectively. The two-point law has lower variance than the exponential law, and its wait \(5\) is correspondingly below \(8\); both are above the deterministic wait \(4\). Substitution into the exact difference formula gives \(8-4=\frac{(\tfrac16)(16)}{\tfrac23}=4\) for exponential versus deterministic, and \(5-4=\frac{(\tfrac16)(4)}{\tfrac23}=1\) for the two-point law versus deterministic.

What the Comparison Does—and Does Not—Say

The comparison is about the stationary mean waiting time. Equal means and equal variances imply equal mean waits under these assumptions, because the formula uses only the first two service-time moments. They do not imply that the waiting-time distributions are identical. The formula also does not say that every customer in the more variable queue waits longer, or that the probability of waiting more than a specified threshold is necessarily larger. Those are statements about distributions, not just their means.

Holding traffic intensity fixed requires care. If both the mean service time \(m\) and \(\rho\) are fixed, then the arrival rate is fixed too, since \(\lambda=\rho/m\). But if only \(\rho\) is held fixed while \(m\) changes, then \(\lambda\) changes and the mean waiting time also carries the scale factor \(m\): $$ \mathbb{E}[W_q]=\frac{\rho m}{2(1-\rho)}(1+\operatorname{CV}^2). $$ So a claim that one queue has a smaller mean wait just because its service variance is smaller is not justified when the service means differ. A fair variability comparison holds the mean service time fixed as well as the traffic intensity.

The assumptions matter. When \(\rho\ge1\), the stationary stable-queue comparison above does not apply. If the service-time second moment is infinite, the finite-mean formula cannot be used to produce a finite wait. And if arrivals are not Poisson or the service discipline is not the one assumed, this M/G/1 formula is not automatically valid. Check the model conditions before substituting moments.

Common pitfall. A frequent error is to insert \(\operatorname{Var}(S)\) in place of \(\mathbb{E}[S^2]\) in the Pollaczek–Khinchine formula. For the exponential example with mean \(2\), that mistake would give \(\frac{(\tfrac14)(4)}{2(1-\tfrac12)}=1\), incorrectly matching deterministic service. The formula requires the second moment, which is \(m^2+\operatorname{Var}(S)=4+4=8\) in this example; the correct mean wait is \(2\). The variance form is valid only after retaining the \(m^2\) term.

Check Your Understanding

Use the formula only after identifying the service mean, second moment, and stability condition.

  1. Two stable M/G/1 queues have the same \(\lambda\) and \(m\), and service variances \(\sigma_1^2=\tfrac12\) and \(\sigma_2^2=2\). Which has the larger mean wait, and what is their difference?
  2. For exponential service with mean \(m\), calculate \(\operatorname{Var}(S)\) and \(\operatorname{CV}^2\). Compare its mean wait with deterministic service at the same \(\lambda\) and \(m\).
  3. Service time is \(2\) or \(4\) with probability \(\tfrac12\) each. Find its mean, variance, and second moment. At what traffic intensity is the M/G/1 comparison formula applicable?
  4. Explain why equal traffic intensity alone does not determine a comparison of mean waiting times when the service means differ.
  5. Does equal service mean and variance imply equal waiting-time distributions? State what the Pollaczek–Khinchine mean formula does establish.