Tutorials › Stochastic Processes › Choosing Service Capacity for a Delay Target

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

Choosing Service Capacity for a Delay Target

Learn to turn a mean-delay requirement into the smallest stable M/M/1 service rate, whether the target concerns total time in the system, queueing delay, or both.

Intermediate 10 min read

What You'll Learn

  • State the stability condition required for stationary M/M/1 delay targets.
  • Solve a mean time-in-system target for the minimum service rate.
  • Solve a mean queueing-delay target, including the positive root of the resulting quadratic.
  • Check which capacity is required when both delay targets apply.
  • Identify why confusing queueing delay with total time in the system gives the wrong answer.

From a Delay Target to a Service Rate

In an M/M/1 queue, increasing the service rate reduces average delay, but the service rate must first be large enough for a stationary queue to exist. Choosing capacity for a delay target is therefore an inversion problem: start with the arrival rate and desired mean delay, then solve for the smallest service rate that meets the target. The answer depends on which delay is being controlled. Time in the system includes service; queueing delay does not.

Consider a queue on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Let \((X_t)_{t\ge0}\) be the continuous-time process counting customers in the system, with state space \(S=\{0,1,2,\ldots\}\). Arrivals form a Poisson process of rate \(\lambda>0\), and each service time is exponential with rate \(\mu>0\). There is one server, an unlimited waiting room, and service is first-come, first-served. The natural filtration is \(\mathcal{F}_t=\sigma(X_s:0\le s\le t)\). A stationary M/M/1 queue requires \(\mu>\lambda\); set \(\rho=\lambda/\mu\) under this condition.

Let \(W\) denote the mean time from arrival until departure, and let \(W_q\) denote the mean time an arriving customer waits before service begins. The standard stationary M/M/1 formulas are

$$ W=\frac{1}{\mu-\lambda}, \qquad W_q=\frac{\lambda}{\mu(\mu-\lambda)}. $$

These formulas apply to a stable queue with \(\lambda>0\) and \(\mu>\lambda\). In terms of the stationary mean numbers \(L=\lambda/(\mu-\lambda)\) in the system and \(L_q=\lambda^2/(\mu(\mu-\lambda))\) in the queue, they follow by dividing each mean number by the arrival rate \(\lambda\) in Little's law. The service time is included in \(W\), but not in \(W_q\).

Minimum Rate for a Mean Time-in-System Target

Suppose the requirement is \(W\le T\), where \(T>0\) is the maximum permitted mean time in the system. The target is feasible with finite service rate: making \(\mu\) sufficiently large makes \(W\) sufficiently small. The inequality can be inverted directly because \(\mu-\lambda\) is positive in the stable range.

Theorem: For fixed \(\lambda>0\) and a target \(T>0\), a stable M/M/1 queue meets \(W\le T\) if and only if \(\mu\ge\lambda+1/T\). Thus the minimum service rate is \(\mu_{\min}=\lambda+1/T\).

Proof. Assume \(\mu>\lambda\). By the mean time-in-system formula, the target is \(1/(\mu-\lambda)\le T\). Both \(T\) and \(\mu-\lambda\) are positive, so multiplying by \(\mu-\lambda\) and dividing by \(T\) preserves the inequality and gives \(1\le T(\mu-\lambda)\), or \(\mu\ge\lambda+1/T\). Conversely, if \(\mu\ge\lambda+1/T\), then \(\mu-\lambda\ge1/T>0\); taking reciprocals gives \(W=1/(\mu-\lambda)\le T\). Equality holds at \(\mu=\lambda+1/T\), while every smaller stable rate fails the target. This proves both the equivalence and minimality. \(\square\)

Worked Example: A Target on Total Time in the System

Arrivals occur at rate \(\lambda=6\) customers per hour. Find the minimum service rate that makes the mean time in the system at most \(T=\tfrac14\) hour.

The rate required by the theorem is \(\lambda+1/T\). Substituting the given values, \(1/T=1/(\tfrac14)=4\) per hour, so \(\mu_{\min}=6+4=10\) customers per hour. This rate is stable because \(10>6\).

Check. At \(\mu=10\), the formula gives \(W=1/(10-6)=1/4\) hour, exactly the target. If a stable rate \(\mu\) is less than \(10\), then \(\mu-6<4\), so \(W=1/(\mu-6)>1/4\) hour. Thus no smaller rate meets the requirement.

Minimum Rate for a Mean Queueing-Delay Target

A queueing-delay target asks for \(W_q\le D\), where \(D>0\). This is not the same inequality as a target on \(W\): the service time is excluded, and the rate appears in both factors of the denominator. Rearranging gives a quadratic in \(\mu\).

Theorem: For fixed \(\lambda>0\) and \(D>0\), a stable M/M/1 queue meets \(W_q\le D\) if and only if \(\mu\ge\bigl(\lambda+\sqrt{\lambda^2+4\lambda/D}\bigr)/2\). This positive root is the minimum service rate.

Proof. In the stable range \(\mu>\lambda\), the denominator \(\mu(\mu-\lambda)\) is positive. Therefore \(W_q\le D\) is equivalent to \(\lambda/[\mu(\mu-\lambda)]\le D\), which, after multiplication by the positive denominator, is equivalent to \(D\mu^2-D\lambda\mu-\lambda\ge0\). The corresponding equation has roots \(\bigl(\lambda\pm\sqrt{\lambda^2+4\lambda/D}\bigr)/2\), by the quadratic formula. Since \(\lambda>0\) and \(D>0\), \(\sqrt{\lambda^2+4\lambda/D}>\lambda\); the root with the minus sign is negative. The root with the plus sign, call it \(r\), is greater than \(\lambda\), because \(r-\lambda=(\sqrt{\lambda^2+4\lambda/D}-\lambda)/2>0\). Factoring the quadratic as \(D(\mu-r)(\mu-r_-)\), where \(r_-<0\) is the negative root, shows that for \(\mu>\lambda>0\) its value is nonnegative exactly when \(\mu\ge r\): the factor \(\mu-r_-\) is positive, so the sign is the sign of \(\mu-r\). Hence the target holds exactly for stable rates at least \(r\), and equality at \(r\) proves it is the minimum. \(\square\)

The queueing-delay expression also decreases strictly as \(\mu\) increases through the stable range. Indeed, if \(\mu_2>\mu_1>\lambda\), then \(\mu_2(\mu_2-\lambda)-\mu_1(\mu_1-\lambda)=(\mu_2-\mu_1)(\mu_2+\mu_1-\lambda)>0\). Thus the denominator grows while the numerator \(\lambda\) stays fixed. The root calculation gives the exact threshold; this monotonicity explains why rates above it continue to meet the target.

Worked Example: A Target on Waiting Before Service

Arrivals occur at rate \(\lambda=2\) customers per minute. Find the minimum service rate for which the mean queueing delay is at most \(D=\tfrac14\) minute.

Substitute \(\lambda=2\) and \(D=\tfrac14\) into the positive-root formula. The discriminant is \(\lambda^2+4\lambda/D=2^2+4(2)/(\tfrac14)=4+32=36\), whose square root is \(6\). Therefore \(\mu_{\min}=(2+6)/2=4\) customers per minute, which satisfies \(4>2\).

Check. At \(\mu=4\), the formula gives \(W_q=2/[4(4-2)]=2/8=\tfrac14\) minute. If \(2<\mu<4\), then \(\mu(\mu-2)<4(4-2)=8\), so \(W_q=2/[\mu(\mu-2)]>2/8=\tfrac14\) minute. The boundary rate therefore meets the target and every smaller stable rate fails it.

Meeting Two Targets at Once

Sometimes a service specification limits both the mean time in the system and the mean time waiting in the queue. Each target imposes its own lower bound on \(\mu\). Since both delays decrease with service rate in the stable range, meeting both targets requires meeting the more demanding of the two bounds.

Takeaway: For targets \(W\le T\) and \(W_q\le D\), with \(\lambda>0\), \(T>0\), and \(D>0\), the minimum rate is \(\max\left\{\lambda+1/T,\ \bigl(\lambda+\sqrt{\lambda^2+4\lambda/D}\bigr)/2\right\}\).

To justify the combined rule, the first theorem says the system-time target holds exactly above its stated threshold, and the second says the queueing-delay target holds exactly above its threshold. Both hold precisely when \(\mu\) is at least each threshold, which is equivalent to being at least their maximum. Each threshold exceeds \(\lambda\), so the resulting choice is stable. At the maximum itself both inequalities hold, and any smaller rate violates at least the target whose threshold is larger.

Worked Example: Applying Both Delay Limits

Suppose \(\lambda=3\) customers per hour, the mean time in the system must be at most \(T=\tfrac12\) hour, and the mean queueing delay must be at most \(D=\tfrac16\) hour. Find the minimum rate meeting both requirements.

The system-time bound is \(\lambda+1/T=3+1/(\tfrac12)=3+2=5\) customers per hour. For the queueing-delay bound, the discriminant is \(\lambda^2+4\lambda/D=3^2+4(3)/(\tfrac16)=9+72=81\), with square root \(9\). Its threshold is \((3+9)/2=6\) customers per hour. The maximum is \(6\), so \(\mu_{\min}=6\), which is stable because \(6>3\).

Check. At \(\mu=6\), \(W=1/(6-3)=1/3\) hour, which is at most \(1/2\) hour, and \(W_q=3/[6(6-3)]=3/18=1/6\) hour, exactly its limit. A rate below \(6\) fails the queueing-delay target by the second theorem, even if it is at least \(5\) and meets the system-time target. Thus the combined answer is the minimum.

Feasibility, Units, and a Common Mistake

The targets in these results must be strictly positive. With \(\lambda>0\), the mean queueing delay \(W_q=\lambda/[\mu(\mu-\lambda)]\) is positive for every finite stable \(\mu\), so a zero queueing-delay target cannot be met by any finite service rate. Likewise, \(W=1/(\mu-\lambda)>0\) for every finite stable \(\mu\), so a zero system-time target cannot be met. A positive target, by contrast, always has a finite rate threshold given above.

Keep units consistent: \(\lambda\) and \(\mu\) are rates, while \(T\) and \(D\) are times in the reciprocal unit. Thus \(1/T\) is a rate, and \(\lambda/D\) has units of rate squared, as required to add it to \(\lambda^2\) in the queueing-delay formula. Convert all quantities to a common time unit before applying either formula.

Common mistake: using the system-time formula for a queueing-delay target. For the values \(\lambda=2\) customers per minute and \(D=\tfrac14\) minute, incorrectly treating the target as \(W\le D\) gives \(\mu=2+1/(\tfrac14)=6\). That rate is stable, but it is not the minimum rate for the queueing-delay target: at \(\mu=4\), the actual queueing delay is already \(2/[4(4-2)]=\tfrac14\) minute. The system-time calculation answers a different question; at \(\mu=4\), total time is \(1/(4-2)=\tfrac12\) minute. Always choose the formula matching the stated delay.

Check Your Understanding

For each question, assume a stationary M/M/1 queue with positive arrival rate and positive target. Check stability and substitute any proposed threshold into the relevant mean-delay formula.

  1. For \(\lambda=5\) customers per hour and a mean time-in-system target of \(\tfrac13\) hour, what is the minimum service rate?
  2. For \(\lambda=1\) customer per minute and a mean queueing-delay target of \(\tfrac13\) minute, find the minimum service rate using the positive root.
  3. Explain why the queueing-delay threshold is greater than \(\lambda\), even before checking the delay formula.
  4. If both a system-time limit and a queueing-delay limit apply, why is the required rate the larger of the two individual thresholds?
  5. Can a finite service rate meet a zero mean queueing-delay target when \(\lambda>0\)? Justify your answer from the formula.