ELLMEngineering Large
Language Models
Download PDF

Chapter 63

Capacity Strategy and Migration Economics

On this page

Capacity planning chooses replicas, placement and migration timing under workload, failure and quality constraints. The economic comparison must include useful output, idle reserve, dual operation and the cost of recovery.

Size capacity for a declared failure model

Let peak offered rate be lambda, per-replica sustainable capacity be mu, and the target utilization ceiling be u. Suppose the service must survive loss of any f identical replicas. An initial bound is (n-f)*mu*u >= lambda, giving n >= f + ceil(lambda/(mu*u)). Use measured capacity at the required shape mix and SLO; peak device FLOP/s is not mu. The bound assumes remaining replicas can share the work, dependencies retain capacity and sufficient request state fits.

For a hypothetical 600 requests/s peak, replicas sustaining 100/s, utilization ceiling 0.70 and tolerance of two replica losses, the bound gives eleven replicas. After losing two, nine replicas supply a planning capacity of 630/s. Ten would leave 560/s and miss the target. This is a resource floor under the stated assumptions, not a tail-latency forecast. A rack failure that removes four colocated replicas invalidates the two-replica failure model.

Cold-cache capacity can dominate the plan. If a surviving replica provides only 65/s during recovery, the same arithmetic gives 2 + ceil(600/(65*0.70)) = 16 replicas. Alternatively, predeclare admission limits, cross-region capacity or a workload reduction during that interval. The choice must appear in the service contract and be exercised during recovery tests.

Identify the binding resource

For each workload class, estimate compute, memory-residency, transfer and verification demand. In a linear first approximation, resource r requires sum_j lambda_j * demand_jr <= available_r. Demand has the corresponding units, such as accelerator-seconds per request or bytes per request. Batching and shape-dependent rates violate constant-demand assumptions, so use measured response surfaces for the final plan.

A model that reduces decode time may leave retrieval or verification saturated. A cache that reduces compute can saturate its transfer link. Compare candidate investments against the resource that prevents the required useful throughput, then repeat the analysis after removing that bottleneck. Capacity and budget are coupled: additional reserve lowers utilization while protecting failure behavior.

Compare three uses of the same engineering budget

Assume a service spends 100 cost units per hour and delivers 10,000 verified tasks. A candidate kernel accelerates an operation that consumes 8% of end-to-end time by 2x. Under an idealized serial Amdahl model, the speedup is 1/(0.92+0.08/2) = 1.0417, about 4.2%. It cannot support a 2x fleet-capacity claim.

A data change that increases verified yield from 80% to 88% at the same attempt cost improves useful output by 10%, assuming task mix and service constraints remain fixed. A reliability change that halves a 6% retry rate may save compute and reduce tails, but its benefit depends on where retries occur and whether they duplicate expensive generation. These comparisons identify experiments; the assumptions need workload evidence.

Account for migration and operation

Suppose a new accelerator path saves 20 units/hour in steady operation but requires 8,000 units of migration cost and 5 additional units/hour of ongoing support. Net saving is 15/hour, so simple payback is about 533 operating hours, excluding financing, utilization changes, and risk. At four useful hours/day, that is roughly 133 days; at continuous useful load, about 22 days.

A platform that wins on device price can lose after compiler misses, unsupported model variants, additional replicas, and incident burden. The portability chapter defines the technical acceptance conditions. This calculation adds the time spent reaching and maintaining that accepted state.

A staged investment decision

First establish whether the candidate can run the actual model/precision/state configuration. Next measure its relevant workload, including cold start and recovery. Then estimate migration and recurring support from the working implementation. Commit broadly only after those three sources of uncertainty have narrowed.

A three-month plan should buy information in this order, not promise a platform migration before its limiting assumption is tested. If the target cannot support required cache semantics, kernel tuning is not the next milestone. If the service is verification-bound, a faster decode kernel may not be the highest-value investment.

Exercise: the kernel's share rises from 8% to 40% after retrieval is cached. Its ideal 2x local acceleration now gives 1/(0.6+0.4/2)=1.25, a 25% speedup. The priority changes because the workload's bottleneck changed, not because the kernel itself improved again.

Sensitivity before a migration commitment

The 533-hour result assumes the 20-unit saving and 5-unit support cost accrue only while useful work runs. If support instead costs five units for every calendar hour, daily saving is 20*h - 5*24, where h is useful operating hours per day. At four hours/day this is minus 40 units: the migration never repays its initial cost under those assumptions. At twelve hours/day it saves 120/day and repays 8,000 units in about 67 days. At twenty-four hours/day it saves 360/day and repays in about 22 days. The accounting boundary changes the decision more than rounding the original ratio.

Now suppose migration overlap costs an additional 2,000 units before retiring the old fleet. At twelve useful hours/day, simple payback becomes 10000/120, about 83 days. A candidate that serves 10% fewer verified tasks at the same attempt rate also needs an adjusted fleet count before calling its lower device bill a saving. If quality is a hard floor, reject that candidate instead of converting the regression into a favorable average cost.

Useful hours/day Daily net saving, support billed continuously Payback for 10,000 total migration units
4 -40 No payback under these assumptions
6 0 No payback
12 120 About 83 days
24 360 About 28 days

A migration memo should therefore specify the utilization range, when support is billed, overlap duration, verified yield and rollback capacity. The decision is conditional: proceed at the twelve-hour workload only if the useful-output floor holds and the expected operating horizon exceeds the payback interval with room for uncertainty. A shorter contract or a six-hour workload warrants keeping the incumbent, even though the same kernel benchmark still favors the candidate.