Support Desk 3: The Utilization Cliff
Uses Only Free-Tier SpiceGrinder
Problem statement
Lesson 3.2 ran one support agent at a load of 90%: customers arrive on average 0.9 a minute, each takes a minute to serve, and the agent is busy nine minutes in ten. The average wait came out at 9 minutes, and it took ten million customers to pin that down to under 1%. This lesson asks what happens when only the load changes. The questions:
- How does the average wait grow as the agent gets busier: gently, or not?
- At what load does the average wait reach 10 minutes, or 5?
- How many customers must a simulation run before its answer is good to 2%, and does that number depend on the load?
The second question has an answer you can compute, and the first and third are best seen by running the queue at several loads and comparing. The model is the one from lesson 3.2 and nothing in it changes except one number. The load is the arrival rate divided by the service rate; with a service rate of 1 a minute, the load is the arrival rate itself, so a load of 95% is 0.95 customers a minute.
The model
Lesson 3.2’s model, with a different arrival rate. Here it is at 95%, samples/simulation/support-desk-load-95.xml, four nodes, seed 20261008:
<dataset columns="wait, service, gap" seed="20261008">
<root node="Wait"/>
<nodes>
<Exponential name="Service" lambda="1.0"/>
<Exponential name="Interarrival" lambda="0.95"/>
<Append name="Step">
<input name="Service"/>
<input name="Interarrival"/>
</Append>
<Recur name="Wait" initial="0" expression="y[0] = max(0, s[0] + x[0] - x[1])" appendInput="true">
<input name="Step"/>
</Recur>
</nodes>
</dataset>
Each row is a customer, and the wait is the previous wait plus the service time minus the gap, floored at zero (Lindley’s recursion, as in lesson 3.2). The only difference from 3.2 is lambda="0.95" on the Interarrival node, where 3.2 had 0.9. Two samples ship with this lesson: support-desk-load-50.xml (lambda="0.5") and support-desk-load-95.xml, next to lesson 3.2’s recur-lindley-queue.xml at 0.9. For the other loads, copy any of them and edit that one attribute: lambda="0.75" for 75%, lambda="0.8" for 80%, and mean="1.5" for a load of 2/3 (a mean gap of 1.5 minutes is a rate of 2/3). Run it:
grind --count 10 support-desk-load-95.xml
The first five rows with the model’s own seed, 20261008 (you get exactly these if you leave the seed alone):
| Row | Wait (column 0) | Service | Gap | Check: previous wait + service - gap |
|---|---|---|---|---|
| 1 | 0.000 | 0.367 | 3.170 | 0 + 0.367 - 3.170 is negative, so 0 |
| 2 | 0.629 | 1.417 | 0.788 | 0 + 1.417 - 0.788 = 0.629 |
| 3 | 1.069 | 0.820 | 0.381 | 0.629 + 0.820 - 0.381 = 1.069 |
| 4 | 2.119 | 3.894 | 2.844 | 1.069 + 3.894 - 2.844 = 2.119 |
| 5 | 1.192 | 0.001 | 0.928 | 2.119 + 0.001 - 0.928 = 1.192 |
Row 1 is the floor at work: the gap of 3.2 minutes is longer than the service, so the line empties. Other than that, rows 2 to 4 only climb. For a different line each time, leave the seed out:
grind --no-seed --count 1000000 support-desk-load-95.xml
The model was run at seven loads: 50%, 2/3 (66.7%), 75%, 80%, 90%, 10/11 (90.9%) and 95%. The 90.9% load is there because 10/11 is the load where the average wait is exactly 10 minutes. Each load is a single run of 10,100,000 rows with the model’s own seed (20261006 for the 90% model of lesson 3.2; 20261007 and 20261008 for the 50% and 95% samples; 20261009 to 20261012 for the four made by editing the one attribute). As in lesson 3.2, the first 100,000 rows are discarded as a warm-up and the other 10,000,000 are kept, in 100 batches of 100,000 for the standard errors.
Result: the wait does not grow in a straight line
The mean wait in the line, one run per load, with the batch-means standard error and the exact M/M/1 value, rho / (1 - rho) minutes (for this queue, the load rho divided by one minus the load, in units of the one-minute service time):
| Load | Exact mean wait | Measured (batch SE) | Gap in standard errors |
|---|---|---|---|
| 50% | 1.000 | 1.002 (0.002) | +1.12 |
| 66.7% | 2.000 | 2.000 (0.005) | +0.04 |
| 75% | 3.000 | 3.002 (0.009) | +0.24 |
| 80% | 4.000 | 3.988 (0.014) | -0.84 |
| 90% | 9.000 | 9.036 (0.062) | +0.58 |
| 90.9% | 10.000 | 9.970 (0.077) | -0.39 |
| 95% | 19.000 | 19.027 (0.23) | +0.12 |
Every measured value is within 1.2 standard errors of the exact one. The picture is the whole point:
From 50% to 80% load, the load rises by 60% and the wait goes from 1 minute to 4. From 80% to 95%, the load rises by 19% and the wait goes from 4 minutes to 19. The wait is rho / (1 - rho), so what matters is the free capacity, 1 - rho: near full load, every time the idle share of the agent halves the wait roughly doubles. At 50% load the agent has half its time free; at 90% a tenth; at 95% a twentieth.
Two comparisons are worth saying out loud, because the numbers are easy to misread:
- The wait in the line doubles at a load of 2/3, not at 75%. At 50% load the wait is 1 minute; at 2/3 it is 2 (measured 2.000); at 75% it is 3, three times as long as at 50%.
- The time in the system, wait plus service, doubles at 75%. A customer’s whole visit at 50% load is 1 minute in the line plus 1 minute of service, 2 minutes. At 75% it is 3 plus 1, 4 minutes (the measured wait of 3.002 plus the minute of service is 4.0). It doubles again at 87.5%, to 8.
And the answer to “what load keeps the average wait under 10 minutes”: the wait is 10 minutes at 10/11, which is 90.9%, and the run at that load measured 9.970 (standard error 0.077). For 5 minutes the load is 5/6, 83.3%. Past 90% there is almost no room: going from 90% to 95% doubles the wait, from 9 to 19 minutes.
The other quantities, also from these runs, with the exact value in brackets. The share of customers who wait at all is just the load (P(wait > 0) = rho), and the share waiting more than t minutes is rho e^(-(1 - rho) t):
| Load | P(wait > 5) | P(wait > 10) | P(wait > 30) |
|---|---|---|---|
| 50% | 0.0413 (0.0410) | 0.0034 (0.0034) | 0.0000 (0.0000) |
| 66.7% | 0.1259 (0.1259) | 0.0237 (0.0238) | 0.0000 (0.0000) |
| 75% | 0.2151 (0.2149) | 0.0619 (0.0616) | 0.0004 (0.0004) |
| 80% | 0.2936 (0.2943) | 0.1080 (0.1083) | 0.0018 (0.0020) |
| 90% | 0.5468 (0.5459) | 0.3322 (0.3311) | 0.0451 (0.0448) |
| 90.9% | 0.5749 (0.5770) | 0.3646 (0.3663) | 0.0589 (0.0595) |
| 95% | 0.7416 (0.7399) | 0.5777 (0.5762) | 0.2128 (0.2120) |
At 50% load hardly anyone waits more than 10 minutes (about 1 in 300). At 95% load more than half do, and one customer in five waits over half an hour. The average hides this: it is the long tail, not the middle, that grows. The mean wait at 95% is 19 minutes, but the longest wait in the 10,000,000 customers is 223 minutes, more than three and a half hours.
Check: do the numbers match the math?
The formulas are those of the M/M/1 queue from lesson 3.2, now at every load. The mean wait matches in the first table (all seven within 1.2 standard errors). The probabilities in the second table match too: of the 28 values, the largest gap is 1.8 standard errors (the share who wait at all at 90.9%, 0.9082 against 0.9091), and the other 27 are inside 1.4. The variance of the wait also follows the theory, rho (2 - rho) / (1 - rho)^2: measured 3.02, 8.00, 15.04, 23.78, 100.7, 120.5 and 396.9 against exact 3.00, 8.00, 15.00, 24.00, 99.00, 120.00 and 399.00. The time in the system is the wait plus the 1-minute mean service, and the measured waits give 2.002, 3.000, 4.002, 4.988, 10.036, 10.970 and 20.027 minutes against the exact 1 / (1 - rho) = 2, 3, 4, 5, 10, 11 and 20.
The model itself is lesson 3.2’s, with its hand check (the first rows follow max(0, previous wait + service - gap), as in the table above). The two new samples are valid and fit Free: ModelValidatorApp reports VALID, 4 nodes against Free’s limit of 20.
The cost: how long must a run be?
The standard errors in the first table already hint at the problem. Each of those runs is 10,000,000 customers, yet the standard error is 0.18% of the mean at 50% load and 1.2% at 95%. The same run length gives a much worse answer near full load. Two things happen together as the load goes up:
- The waits get more variable. The variance of one wait is 3 at 50% load (mean 1) and 399 at 95% (mean 19): the standard deviation of a wait grows from 1.7 minutes to 20.
- The waits get more strongly tied to each other. A busy line empties slowly, so a customer’s wait is similar to the next customer’s for longer. As in lesson 3.2, ten million correlated waits are worth far fewer independent ones. From the standard errors above, 10,000,000 waits carry the information of about 900,000 independent ones at 50% load, about 125,000 at 80%, about 26,000 at 90%, and only about 7,000 at 95%.
To put a number on it, define the asymptotic variance sigma^2 of the mean wait as the run length N times the variance of the mean of N waits (which settles to a constant as N grows). Then a run of N customers has a standard error of sigma / sqrt(N), and the number of customers needed for a standard error of 2% of the mean is sigma^2 / (0.02 x mean)^2. To measure sigma^2 without leaning on one long run, 100 independent runs were made (seeds 1 to 100) of 1,100,000 rows at each of the seven loads (100,000 warm-up, 1,000,000 kept), each cut into ten batches of 100,000, and the variance of those 1,000 batch means was taken. The result:
| Load | sigma^2 measured | Customers for a 2% SE | Times the 50% load | Spread of the 100 run means at 1,000,000 customers |
|---|---|---|---|---|
| 50% | 30 | 75,000 | 1 | 0.48% of the mean |
| 66.7% | 204 | 127,000 | 1.7 | 0.64% |
| 75% | 736 | 204,000 | 2.7 | 0.82% |
| 80% | 1,954 | 305,000 | 4.1 | 1.02% |
| 90% | 36,604 | 1,130,000 | 15 | 2.01% |
| 90.9% | 54,265 | 1,357,000 | 18 | 2.19% |
| 95% | 617,806 | 4,278,000 | 57 | 3.86% |
For the same relative precision, 95% load needs 57 times as many customers as 50% load. With a million customers, a run at 95% load is still 3.9% off the mean at one standard error; a run at 50% load is 0.5% off. The last column is the plain version: the spread of 100 independent million-row runs, as a share of the true mean.
Here is the same fact in a picture. Each panel shows ten runs (seeds 1 to 10), each line the running mean of the wait so far, divided by the true mean so that the two loads share a scale:
The spread of a single run’s answer, as a share of the true mean, at three run lengths, from the 100 runs:
| Customers kept | 50% load | 95% load |
|---|---|---|
| 10,000 | 5.4% | 43.7% |
| 100,000 | 1.8% | 13.6% |
| 1,000,000 | 0.48% | 3.9% |
At 95% load a run of 10,000 customers is typically off by 40%. By 100,000 customers only 17 of the 100 runs land within 2% of the truth, against 76 of 100 at 50% load; by a million, 38 of 100 against all 100. The chart below shows the customers needed for a 2% standard error at each load, on a logarithmic scale:
Does the estimate hold up? For the two ends, 100 fresh runs were made (seeds 201 to 300) with exactly the number of customers the table calls for: 75,000 at 50% load and 4,278,000 at 95%. The spread of their means, as a share of the true mean, was 1.79% at 50% and 1.84% at 95%. That is the 2% the table promised, within the uncertainty of a spread measured from 100 runs (about 7%). The sigma^2 values themselves are uncertain by a few percent for the same reason; they agree with the textbook value for this queue, rho (2 + 5 rho - 4 rho^2 + rho^3) / (1 - rho)^4, to within 3.4% at all seven loads (for example 36,604 against 35,901 at 90%, and 617,806 against 607,601 at 95%).
Revisit the rule of thumb from lesson 1.5. There, the precision of an average of n independent rows was the standard deviation of one row over the square root of n, so the rows needed for a 2% standard error of a mean would be the variance of one wait over (0.02 x mean)^2. For this queue that rule asks for about 7,500 customers at 50% load and about 2,800 at 95%. The right answers are 75,000 and 4,278,000: ten times as many at 50%, and fifteen hundred times as many at 95%. The square-root law still holds (a hundred times the customers buys ten times the precision), but the constant in front of it is no longer the variance of one row. It is sigma^2, the asymptotic variance, and sigma^2 is 10 times the variance of one wait at 50% load and 1,500 times at 95%. For correlated output, the row count a quick rule suggests is a lower bound, and near full load it can be off by three orders of magnitude. Measure sigma^2 with batch means, as above, before trusting a run length.
The companion page lets you slide the load and read off the average wait, the share who wait more than 5, 10 and 30 minutes, and the customers a run needs, from the exact formulas and from these runs.
In Pro, declare and Import build all of these loads from one library file with the arrival rate as a parameter (Module 4), rather than a separate file for each.
What this gives you: the same four-node queue at seven loads, changing one attribute; the cliff, with an average wait that grows as rho / (1 - rho) (1, 2, 3, 4, 9, 10 and 19 minutes at 50%, 66.7%, 75%, 80%, 90%, 90.9% and 95% load, measured within 1.2 standard errors of exact); the difference between the wait in the line, which triples from 50% to 75% load, and the time in the system, which doubles; a tail that grows faster than the mean (1 customer in 300 waits over 10 minutes at 50% load, more than half at 95%); and the cost of precision, which explodes as the load nears 1: 75,000 customers for a 2% standard error at 50% load, 4,278,000 at 95%, 57 times more, confirmed by 100 fresh runs at each end. The rule of thumb from lesson 1.5 asks for 2,800 customers at 95% load; the right number is fifteen hundred times that, because neighboring waits are nearly the same number.
Everything so far has used one number for the load, an average. An average load hides when the arrivals come: the desk is busy at some times of the day and quiet at others, and the same average behaves very differently. Lesson 3.4 keeps the average load fixed and puts the arrivals into busy stretches and quiet ones.