Skip to content
nonconvexcard

Price a latency target

NumericalIntermediate⏱ 30 minAI Systemscostlatencyutilisationtradeoff

Problem

A replica costs $2.80 per hour and can emit 4000 tokens per second at saturation. Its bare mean service time is SS.

  1. Derive cost per million tokens as a function of the mean-latency target WW, in units of SS.
  2. Tabulate it for W/S∈{1.5,2,4,10}W/S \in \{1.5, 2, 4, 10\}.
  3. A product team asks to move from W=4SW = 4S to W=1.5SW = 1.5S. By what factor does unit cost rise?
  4. Batch and interactive traffic currently share one pool at W=2SW = 2S. Half the tokens are batch and could tolerate W=10SW = 10S. What is the blended saving from splitting the pools?

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

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
Sizing best-of-nAgentsNumericalBeginner15 min
Derive the M/M/1 queue from detailed balanceAI SystemsProofIntermediate1 hour
Simulate M/M/1 and verify the utilisation wall runAI SystemsCodingIntermediate1 hour
Single-stream decode latency floorsLLM OpsNumericalIntermediate30 min
Size a serving cluster and find the binding constraintAI SystemsNumericalIntermediate1 hour