Navigation
⚡ Inference Systems· 8 min read

Metrics Definition

TTFT, TPOT, ITL, throughput, goodput — precise definitions, measurement methods, and how metrics relate to each other.

metricsttfttpotthroughputgoodputbenchmarking

Inference performance requires precise metrics. Using the wrong metric — or measuring the right metric incorrectly — leads to optimizing the wrong thing.


1. Latency Metrics

MetricDefinitionFormulaMatters for
TTFTTime from request submission to first output tokenTqueue+TprefillT_{\text{queue}} + T_{\text{prefill}}User-perceived responsiveness
TPOTAverage time between output tokens (decode phase)(Tend−Tfirst)/(Nout−1)(T_{\text{end}} - T_{\text{first}}) / (N_{\text{out}} - 1)Streaming generation speed
ITLInter-token latency (per-token, not averaged)Ti+1−TiT_{i+1} - T_i for each consecutive pairDetecting jitter/spikes
E2ETotal request latencyTTFT+TPOT×(Nout−1)\text{TTFT} + \text{TPOT} \times (N_{\text{out}} - 1)Overall experience

TTFT vs TPOT

  • Short outputs (20 tokens): TTFT dominates → optimize prefill
  • Long outputs (500+ tokens): TPOT dominates → optimize decode
  • Streaming chat: Both matter — user sees TTFT first, then TPOT determines “typing speed”

2. Throughput Metrics

MetricDefinitionUnitPerspective
Output tokens/sTotal output tokens generated per second (all requests)tok/sSystem capacity
Tokens/s/GPUThroughput normalized by GPU counttok/s/GPUHardware efficiency
Requests/s (RPS)Completed requests per secondreq/sAPI capacity

Throughput-Latency Tradeoff

As concurrent requests increase:

  1. Throughput rises (batching utilizes idle compute)
  2. Latency stays flat (batch fits in resources)
  3. Latency rises (queuing starts, resources saturated)
  4. Throughput plateaus or drops (preemption, OOM)

The operating point: Highest throughput where P99 latency meets SLA.


3. Goodput

Goodput=RPS×Pr⁡(latency meets SLA)\text{Goodput} = \text{RPS} \times \Pr(\text{latency meets SLA})

Raw throughput that doesn’t meet latency targets is useless. Goodput is the metric that maps to user experience and business value.


4. Metric Relationships

If you see…It means…Optimize…
High TTFT, low TPOTPrefill is slow (long prompts or queuing)Prefill throughput, chunked prefill
Low TTFT, high TPOTDecode is slow (memory-bound)Quantization, batching, TP
High P99 but low P50Tail latency from interferencePD disaggregation
Throughput plateaus earlyMemory exhaustion (KV cache)KV quantization, PagedAttention

For detailed latency analysis, see Latency Metrics. For roofline analysis, see Roofline Analysis.


Self-Check

  • Define TTFT, TPOT, ITL, E2E with formulas
  • Determine which metric dominates for a given output length
  • Calculate goodput from RPS and SLA compliance
  • Diagnose a bottleneck from metric patterns