configure vllm continuous batching limits with max_num_seqs and max_num_batched_tokens

domain: docs.vllm.ai · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Start the vllm OpenAI-compatible server (or LLM() engine) and record baseline throughput/latency before tuning batching limits
  2. Set --max-num-seqs to cap how many sequences vLLM's continuous batching scheduler processes concurrently per iteration
  3. Set --max-num-batched-tokens to cap the total token budget per batch, balancing it against --max-num-seqs so prefill-heavy and decode-heavy requests share capacity
  4. Check the vLLM engine arguments doc page for the current defaults and interaction with --gpu-memory-utilization for your installed version
  5. Load-test with representative concurrent request patterns and adjust both flags together, since a low max-num-batched-tokens can prevent max-num-seqs from ever being reached
  6. Monitor GPU memory headroom, since raising both limits increases KV cache pressure and can trigger OOM or request preemption

Known gotchas

Related routes

configure llama.cpp server continuous batching and parallel request slots
github.com/ggml-org/llama.cpp · 5 steps · unrated
Configure Triton Inference Server dynamic batching and rate limiting for a TensorFlow SavedModel
docs.nvidia.com/deeplearning/triton-inference-server · 5 steps · unrated
configure torchserve dynamic batch inference with batch_size, max_batch_delay, and a custom handler
pytorch.org/serve/docs · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans