Skip to content
StackDecode
System Design
16. Performance EngineeringAnimated

Throughput Optimisation

Handling more work per second.

The idea

Batch, pool connections, parallelise and remove contention.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

GPU batch (one row per slot)request 1: 8 tokens leftrequest 2: 9 tokens leftrequest 3: 8 tokens leftwaiting: 3finished: 0idle slot-ticks: 0

Continuous batching: every tick, each running request makes one token of progress.

tick:
1
1/17

Continuous batching is how vLLM, TGI and TensorRT-LLM keep throughput high.

Step by step

  1. 1Find the saturating resource
  2. 2Batch work
  3. 3Add parallelism
  4. 4Check latency stays acceptable

Where it is used

Pipelines and APIs.

Watch out for

Pushing throughput can raise latency.

Related