Skip to content
nonconvexcard

Size a serving cluster and find the binding constraint

NumericalIntermediate⏱ 1 hourAI Systemssizingkv cacheutilisationbottleneck

Problem

A replica has 80 GB of device memory. The model weights occupy 28 GB in bf16 and workspace takes a further 6 GB. Paged allocation achieves η=0.92\eta = 0.92 of the remainder. A typical request holds m=640m = 640 MB of KV cache and takes W=5W = 5 s end to end. Offered load is λ=900\lambda = 900 requests per second and the target utilisation is ρ⋆=0.65\rho^\star = 0.65.

  1. Compute Lmax⁡L_{\max} and the replicas required.
  2. The hardware has a compute-to-bandwidth ratio of 280 FLOP/byte and the weights are 2 bytes per parameter. Estimate the batch at which decode stops being weight-bound, and say whether this replica is memory-bound or compute-bound.
  3. KV quantisation to int8 halves mm. Recompute the replica count and say what changes about the answer to part 2.
  4. Instead of quantising, someone proposes raising ρ⋆\rho^\star to 0.85. Using W=S/(1−ρ)W = S/(1-\rho) with the same bare service time, say what actually happens.

Compute the requested quantities and say what they mean. A number without an interpretation is not an answer.

Hints

Hints — 0 of 2 revealed

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
Implement the cluster sizing formula runAI SystemsCodingBeginner30 min
KV cache sizing with MHA and GQALLM OpsNumericalBeginner30 min
Derive the M/M/1 queue from detailed balanceAI SystemsProofIntermediate1 hour
Price a latency targetAI SystemsNumericalIntermediate30 min
Simulate M/M/1 and verify the utilisation wall runAI SystemsCodingIntermediate1 hour