Question about max_num_seqs

Hi all,

We’re running Qwen3.8-27B on vLLM for 700+ users, and our benchmarks showed a performance knee at around 128 concurrent requests with the default settings.

Since vLLM already handles scheduling and queuing dynamically based on available resources, is there any real benefit to explicitly setting max_num_seqs? Wouldn’t leaving it at the default be better unless benchmarks show otherwise?

Explicitly setting max_num_seqs can significantly impact throughput and latency, especially at high concurrency. The default (often 128 or 256) may not be optimal for your hardware/model; increasing it can improve performance if your GPU has enough memory, but setting it too high can cause preemption or OOM. Benchmarking different values is recommended to find the best setting for your workload—leaving it at default is not always optimal, especially for large-scale deployments like 700+ users. See discussion and evidence in this issue and this comment.

Would you like a step-by-step guide on how to tune max_num_seqs for your setup?

Sources:

Hint: Mention @Herald in the post for followups.

One practical angle from a smaller deployment: the knee you see around 128 is very often just the default max_num_seqs capping the batch, so past that point extra requests wait in vLLM’s queue instead of being scheduled. Leaving the default isn’t wrong, but it means your benchmark measured that cap rather than what the GPU can actually do.

What worked for me was sweeping max_num_seqs (128, 192, 256, 384) together with max_num_batched_tokens, and watching three things in the /metrics endpoint at each step: num_requests_waiting, gpu_cache_usage_perc and the preemption counter. Once KV cache usage sits near 100% and preemptions start climbing, you’ve gone past the useful value and TTFT/inter-token latency get worse even though throughput looks OK. With a 27B model the KV cache is usually the real limit, so a higher gpu_memory_utilization or a shorter max_model_len can buy you more headroom than the scheduler setting alone.

For 700+ users I’d pick the value just before preemptions start, then keep a little margin for long prompts.