Log inStart free
LESSON 29.11 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Throughput vs latency

Change the batch size and watch the GPU trade speed per user for total work.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 29.11 · SERVING BAY14.0 REQ/S · T 716.6 MS
01
Stage 1 of 5 · Requests per second
Throughput counts finished work per second. The 10 requests finish in 0.72 s: 14.0 requests per second, or QPS.
Explain it simply

Each row is one chat request. A request is done at its last blue dot. All ten are done after 0.72 seconds. Throughput divides the work by that time, so this server does 14.0 requests per second.

Ten lanes, one per request. The last token ends at 716.6 ms. Throughput is 14.0 requests per second.

request, prefill, KV memoryqueue waitoutput token, throughputbatch sizeGPU step
requests per second0300600900120015001800 msR1R2R3R4R5R6R7R8R9R10T = 716.6 msrequests/s14.0QPS = 10 / 0.7166 s = 14.0 requests/srequests per second0300600900120015001800 msR1R2R3R4R5R6R7R8R9R10T = 716.6 msrequests/s14.0QPS = 10 / 0.7166 s = 14.0 requests/s
Toy: the 29.C2 trace on one toy GPU
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
QPS=NT\sy{q}{out}{\text{QPS}} = \frac{\sy{n}{data}{N}}{\sy{t}{ink}{T}}
QPS=100.7166 s=14.0 req/s\text{QPS} = \frac{10}{0.7166\ \text{s}} = 14.0\ \text{req/s}

Requests per second is the finished requests over the time they took.

Common mix-ups

MYTHHigh throughput means each user gets tokens fast.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With busy traffic and max batch 10 instead of 4, do output tokens per second go up or down?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 2 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.