Tutorials › Stochastic Processes › Staffing M/M/c Queues to Meet Service Targets

Multi-Server and Finite Queues · Tutorial 656 of 994

Staffing M/M/c Queues to Meet Service Targets

Use Erlang C to translate service targets into staffing tests, then find and verify the smallest server count that meets them.

Advanced 10 min read

What You'll Learn

  • Identify the stability condition and the first eligible server count for an M/M/c queue.
  • Compute Erlang C waiting probabilities from exact finite sums.
  • Translate mean-wait and deadline service targets into server-count tests.
  • Prove that the relevant delay measures improve as servers are added.
  • Find the minimum feasible staffing level and verify that the previous candidate fails.
  • Recognize target values that cannot be met by any finite server count.

Staffing as a Discrete Search

Staffing an M/M/c queue is a constrained integer problem. A proposed server count must first be stable; among stable counts, it must meet the specified service target. Since server counts are integers, the answer is not obtained by solving a continuous equation and rounding. Instead, calculate the performance at successive eligible counts and verify that the first feasible one is minimal.

Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Let \((X_t)_{t\ge0}\) be the continuous-time number of customers in an M/M/c queue, with state space \(S=\{0,1,2,\ldots\}\), arrival rate \(\lambda>0\), and service rate \(\mu>0\) for each of \(c\) servers. Arrivals are Poisson, service times are exponential, and the arrival and service mechanisms are independent. The natural filtration is \(\mathcal{F}_t=\sigma(X_s:0\le s\le t)\). Write \(a=\lambda/\mu\) for offered load. Stability requires \(c>a\), so the first eligible count is the smallest integer strictly greater than \(a\).

The generator \(Q=(q_{ij})\) has \(q_{n,n+1}=\lambda\) and, for \(n\ge1\), \(q_{n,n-1}=\min(n,c)\mu\); its diagonal entry is \(q_{nn}=-(\lambda+\min(n,c)\mu)\), with the service term zero when \(n=0\). Thus each generator row sums to zero: its off-diagonal rates sum to \(\lambda+\min(n,c)\mu\), exactly canceled by the diagonal. The stationary queue-length probabilities give the Erlang C waiting probability. For an eligible \(c\), define

$$ R_c(a)=\sum_{n=0}^{c-1}\frac{a^n}{n!}, \qquad H_c(a)=\frac{a^c}{c!}\frac{c}{c-a}, \qquad C(c,a)=\frac{H_c(a)}{R_c(a)+H_c(a)}. $$

Here \(C(c,a)\) is the probability an arriving customer must wait, also written \(\mathbb{P}(W_q>0)\), where \(W_q\) is that customer's time from arrival until service begins. For a stable M/M/c queue, the waiting-time tail and mean are

$$ \mathbb{P}(W_q>t)=C(c,a)e^{-(c\mu-\lambda)t}\quad(t\ge0), \qquad \mathbb{E}[W_q]=\frac{C(c,a)}{c\mu-\lambda}. $$

These Erlang C formulas apply to the stationary, stable M/M/c model; the exponential tail includes an atom at zero, since its value at \(t=0\) is \(C(c,a)\), not \(1\). The denominator \(c\mu-\lambda\) is the net service capacity in excess of the arrival rate.

Definition: A waiting-probability target \(\alpha\) is met when \(C(c,a)\le\alpha\). A mean-wait target \(w\) is met when \(C(c,a)/(c\mu-\lambda)\le w\). A deadline service-level target \(s\) at deadline \(t_d\ge0\) is met when \(\mathbb{P}(W_q\le t_d)\ge s\), equivalently when \(C(c,a)e^{-(c\mu-\lambda)t_d}\le1-s\). These are waiting-time targets, not targets for total time in the system.

Why Testing Counts in Order Finds the Minimum

The search begins at the first stable count, not at \(c=1\) unless that count is stable. The following result explains why checking eligible counts in increasing order is valid.

Theorem (Monotone staffing test): Fix \(a>0\) and \(\mu>0\). For integers \(c>a\), \(C(c,a)\) decreases strictly as \(c\) increases. Consequently, for each fixed \(t\ge0\), the mean wait and \(\mathbb{P}(W_q>t)\) also decrease strictly. If a target is feasible, the first eligible count passing its test is the smallest count meeting it. For \(\alpha>0\), \(w>0\), or \(s<1\), respectively, the corresponding waiting-probability, mean-wait, or deadline target is feasible at some finite stable count.

Proof. Fix an eligible \(c\). Since \(a<c\), both \(H_c(a)\) and \(R_c(a)\) are positive. Direct simplification gives \(H_c(a)=a^c/((c-1)!(c-a))\), so

$$ \frac{H_{c+1}(a)}{H_c(a)} =\frac{a(c-a)}{c(c+1-a)}<1, \qquad R_{c+1}(a)=R_c(a)+\frac{a^c}{c!}>R_c(a). $$

The strict inequality follows because \(a<c\) and \(c+1-a>0\), and the ratio is positive. Therefore \(H_{c+1}/R_{c+1}<H_c/R_c\). Since \(C(c,a)=z/(1+z)\) for \(z=H_c(a)/R_c(a)>0\), and \(z/(1+z)\) increases with \(z\), \(C(c+1,a)<C(c,a)\). Also \(q_c=c\mu-\lambda>0\) increases strictly with \(c\). Hence \(C(c,a)/q_c\) decreases strictly, and \(C(c,a)e^{-q_ct}\) decreases strictly for every \(t\ge0\). Thus every feasible count has all larger eligible counts feasible, so the first passing count is minimal. To check eventual feasibility, \(R_c(a)\ge a^{c-1}/(c-1)!\), giving \(0<C(c,a)\le H_c(a)/R_c(a)\le a/(c-a)\), which tends to zero. Also \(q_c\) tends to infinity. These bounds imply that \(C(c,a)\), \(C(c,a)/q_c\), and \(C(c,a)e^{-q_ct}\) tend to zero. Therefore each of the stated positive-tolerance targets is eventually met. \(\square\)

In practice, one can use the following procedure. With several targets, test all of them at each candidate and stop only when all are met.

1
Find the stable starting count.
Set \(a=\lambda/\mu\) and start at the smallest integer \(c>a\).
2
Evaluate performance.
Compute \(C(c,a)\), \(c\mu-\lambda\), and whichever mean-wait or deadline quantity is needed.
3
Test and advance.
If any required target fails, increase \(c\) by one and repeat. The theorem guarantees that the first count passing every target is minimal.

Worked Staffing Calculations

Worked Example: A Waiting-Probability Target

Arrivals occur at rate \(\lambda=6\) customers per hour, and each server works at rate \(\mu=2\) customers per hour. Find the smallest server count for which the probability of waiting is at most \(\tfrac14\).

The offered load is \(a=6/2=3\), so stability requires \(c>3\). The generator rows have off-diagonal total \(6+\min(n,c)2\) and diagonal \(-(6+\min(n,c)2)\), so they sum to zero. At \(c=4\), the finite sum is \(R_4=1+3+\tfrac92+\tfrac{27}{6}=13\), and \(H_4=(81/24)(4/(4-3))=27/2\). Therefore \(C(4,3)=(27/2)/(13+27/2)=27/53\). This exceeds \(\tfrac14\), since \(108>53\).

At \(c=5\), \(R_5=13+\tfrac{81}{24}=\tfrac{131}{8}\), while \(H_5=(243/120)(5/(5-3))=\tfrac{81}{16}\). Thus

$$ C(5,3)=\frac{81/16}{131/8+81/16} =\frac{81}{343}<\frac14, \qquad 324<343. $$

Check: \(c=4\) fails and \(c=5\) passes. Since \(4\) is the first stable count and the waiting probability decreases with \(c\), five servers is the minimum.

Worked Example: A Mean-Wait Target

Use the same arrival and service rates, but require \(\mathbb{E}[W_q]\le\tfrac1{50}\) hour. Find the smallest server count.

The offered load is again \(a=3\), so \(c\ge4\) is required. The generator rows again have off-diagonal total \(6+\min(n,c)2\), canceled by the diagonal. At \(c=4\), \(C(4,3)=27/53\), and \(c\mu-\lambda=8-6=2\). Hence the mean wait is \((27/53)/2=27/106\) hour, which exceeds \(\tfrac1{50}\), since \(1350>106\).

At \(c=5\), \(C(5,3)=81/343\) and \(c\mu-\lambda=10-6=4\). The mean wait is therefore \((81/343)/4=81/1372\) hour. This is below \(\tfrac1{50}\), since \(4050<1372\) would be false; in fact \(81/1372<1/50\) requires \(4050<1372\), which is false. Thus five servers do not meet the target.

At \(c=6\), \(R_6=R_5+\tfrac{243}{120}=\tfrac{92}{5}\), and \(H_6=(729/720)(6/(6-3))=\tfrac{81}{40}\). It follows that \(C(6,3)=(81/40)/(92/5+81/40)=81/817\). The net rate is \(12-6=6\), so the mean wait is \(81/(817\cdot6)=27/1634\) hour. Now \(27/1634<1/50\), because \(1350<1634\).

Check: Four servers fail; five servers also fail because \(4050>1372\); six servers pass. The monotonicity result confirms that six is the minimum. The exact comparison at five also shows why the intermediate arithmetic must be checked rather than inferred from an approximate impression.

Worked Example: A Deadline Service Level

With \(\lambda=6\) and \(\mu=2\), require at least \(\tfrac78\) of customers to begin service within \(t_d=\tfrac14\) hour. Find the smallest server count.

Here \(a=3\), stability requires \(c\ge4\), and each generator row has off-diagonal total \(6+\min(n,c)2\), canceled by its diagonal. The deadline requirement is equivalent to \(\mathbb{P}(W_q>\tfrac14)\le\tfrac18\). At \(c=4\), the net rate is \(8-6=2\), so the tail is \((27/53)e^{-1/2}\). Since \(e<4\), \(e^{1/2}<2\), and therefore this tail is greater than \(27/106\), which exceeds \(\tfrac18\) because \(216>106\). Four servers fail.

At \(c=5\), the net rate is \(10-6=4\), so the deadline tail is \((81/343)e^{-1}\). Since \(e>2\), this is less than \(81/686\), which is below \(\tfrac18\) because \(648<686\). Five servers pass. The bounds \(2<e<4\) follow, for example, from \(e=\sum_{k=0}^{\infty}1/k!\): the first two terms sum to \(2\), while \(1/k!\le 1/2^{k-1}\) for \(k\ge2\), giving \(e\le3<4\).

Check: The tail probability at four servers is strictly above \(\tfrac18\), and at five it is strictly below \(\tfrac18\). Thus the service level is below \(\tfrac78\) at four and above \(\tfrac78\) at five; five servers is minimal.

Interpreting the Answer and Avoiding Pitfalls

For a deadline target, the service-level probability is \(1-C(c,a)e^{-(c\mu-\lambda)t_d}\), not \(1-C(c,a)\) unless the deadline is zero. For a mean-wait target, divide by the net rate \(c\mu-\lambda\), not by \(c\mu\). Both errors can lead to under-staffing. Units also matter: if rates are per hour, a deadline entered in minutes must first be converted to hours.

The target boundaries determine whether a finite answer exists. For a stable finite \(c\), \(C(c,a)>0\) and \(c\mu-\lambda>0\), so the mean wait is positive and the deadline tail is positive at every finite deadline. Consequently, a zero waiting-probability target, a zero mean-wait target, or a deadline service level of exactly \(1\) cannot be met with finitely many servers when \(\lambda>0\). By contrast, any strictly positive tolerance for waiting probability or mean wait, and any deadline service level strictly below \(1\), can be met at some finite stable count, as shown in the theorem.

A common computational mistake is to check only that \(c\mu\) exceeds \(\lambda\), then round a continuous staffing estimate. Stability is necessary, but it does not verify a service target. The correction is to evaluate the Erlang C quantity at integer counts, starting with the first stable count, and explicitly check that the preceding eligible count fails. When several targets apply, the same count must satisfy all of them; satisfying a mean-wait target alone does not establish a deadline service level unless that deadline probability is also evaluated.

Check Your Understanding

Use exact inequalities and state the stability check whenever you compare server counts.

  1. For \(\lambda=4\) and \(\mu=2\), what is the first stable server count, and why is equality at \(c=2\) not sufficient?
  2. Write the Erlang C test for a mean-wait target \(w\) in terms of \(C(c,a)\), \(c\), \(\mu\), and \(\lambda\).
  3. For a deadline \(t_d>0\), which tail probability must be at most \(1-s\) to meet service level \(s\)?
  4. Explain why checking the first passing eligible count proves minimality when performance improves with \(c\).
  5. Can a finite stable M/M/c queue with positive arrival rate meet a deadline service level of exactly \(1\)? Explain using the Erlang C tail.