{"slug": "what-i-learned-from-load-testing-vllm-on-colab-s-free-t4-gpu", "title": "What I Learned from Load Testing vLLM on Colab's Free T4 GPU", "summary": "A load test of a vLLM inference server serving Qwen/Qwen2.5-0.5B-Instruct on Colab's free 16 GB T4 GPU, run with the `vllm bench serve` command at 32 prompts of 512 input and 128 output tokens with max concurrency 1, measured 1.17 requests per second, 149.83 output tokens per second, a median time to first token of 51.49 ms and a median time per output token of 6.05 ms. The author concluded that tuning an inference server's workload requires trading off latency against throughput. The roughly 1 GB model left ample VRAM headroom for the KV cache on the T4.", "body_md": "I recently benchmarked a vLLM server on Colab’s free T4 GPU to learn more about how LLM inference pipelines work.\n\nFrom this experience I learned one key principle: **tuning the workload of an inference server requires making a tradeoff between latency and throughput.**\n\n## Contents[#](#contents)\n\n## Setup[#](#setup)\n\n### Colab Notebook[#](#colab-notebook)\n\nAll of the relevant code I used for this is in this [Colab notebook](https://colab.research.google.com/drive/1hNetAa17_QkR_Tl-EQZZOkBNaWTKTFqC?usp=sharing).\n\n### Running the Inference Server[#](#running-the-inference-server)\n\nIn Colab I ran a vLLM inference server on a T4 GPU. I configured the inference server to serve requests using the [Qwen/Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) model.\n\nBecause the notebook uses a Python runtime, you can run the server itself using a subprocess:\n\n```\nserver = subprocess.Popen(\n    [\"vllm\", \"serve\", \"Qwen/Qwen2.5-0.5B-Instruct\", \"--dtype\", \"half\", \"--max-model-len\", \"4096\"],\n    stdout=log, stderr=subprocess.STDOUT,\n)\n```\n\nThe model itself is about 1 GB in size. Since the GPU has 16 GB of VRAM, there’s plenty of headroom for the [KV cache](https://huggingface.co/blog/not-lain/kv-caching).\n\nThe vLLM CLI offers the [`vllm bench serve`](https://docs.vllm.ai/en/stable/cli/bench/serve/) command, which you can use to run load testing on the inference server. It also provides metrics from the test results. Here’s an example of how the command is used:\n\n```\nvllm bench serve --model Qwen/Qwen2.5-0.5B-Instruct --dataset-name random \\\n    --random-input-len 512 --random-output-len 128 --ignore-eos \\\n    --num-prompts 32 --max-concurrency 1\n```\n\nHere’s what each flag does:\n\n- `num-prompts` controls the number of requests.\n- `max-concurrency` sets the maximum number of concurrent requests.\n- `random-input-len` sets the number of tokens in the input prompts.\n- `random-output-len` sets the length of the model’s output response.\n- `dataset-name` selects where the prompts come from. Using the argument`random` with this flag will generate synthetic input prompts to simulate user queries.\n- `ignore-eos` tells the server to keep generating past the end-of-sequence (EOS) token that a model emits when it’s finished, so every request produces exactly 128 output tokens.\n\nThe command above outputs something like this:\n\n```\n============ Serving Benchmark Result ============\nSuccessful requests:                     32\nFailed requests:                         0\nMaximum request concurrency:             1\nBenchmark duration (s):                  27.34\nTotal input tokens:                      16384\nTotal generated tokens:                  4096\nRequest throughput (req/s):              1.17\nOutput token throughput (tok/s):         149.83\nPeak output token throughput (tok/s):    160.00\nPeak concurrent requests:                3.00\nTotal token throughput (tok/s):          749.14\n---------------Time to First Token----------------\nMean TTFT (ms):                          85.09\nMedian TTFT (ms):                        51.49\nP99 TTFT (ms):                           792.99\n-----Time per Output Token (excl. 1st token)------\nMean TPOT (ms):                          6.05\nMedian TPOT (ms):                        6.05\nP99 TPOT (ms):                           6.23\n---------------Inter-token Latency----------------\nMean ITL (ms):                           6.05\nMedian ITL (ms):                         6.05\nP99 ITL (ms):                            8.84\n==================================================\n```\n\nI’ll dig into what drives these metrics in the future. But for now these are the ones I’ll focus on:\n\n- Output token throughput (tok/s), which measures the rate at which output tokens are generated\n- Median TTFT, which measures the median time to first token (TTFT) across all requests\n- Median TPOT, which is the median time per output token (TPOT) across all requests\n\n## Results[#](#results)\n\nI did three separate runs using `vllm bench serve` to simulate three different loads. I used the same command I shared above:\n\n```\nvllm bench serve --model Qwen/Qwen2.5-0.5B-Instruct --dataset-name random \\\n    --random-input-len 512 --random-output-len 128 --ignore-eos \\\n    --num-prompts 32 --max-concurrency 1\n```\n\nThe only things I varied between runs were `max-concurrency` and `num-prompts`, which correspond to the first two columns in the table below, respectively.\n\n| No. of Concurrent Requests | Total No. of Requests | Output Tokens per Second | Mean TTFT (ms) | Median TTFT (ms) | Mean TPOT (ms) | Median TPOT (ms) | \n|---|---|---|---|---|---|---|\n| 1 | 32 | 149.83 | 85.09 | 51.49 | 6.05 | 6.05 | \n| 8 | 128 | 626.16 | 595.38 | 250.86 | 8.18 | 8.03 | \n| 32 | 256 | 1055.70 | 1657.45 | 332.55 | 17.45 | 16.31 | \n\nFrom these results I learned that processing more requests concurrently improves the tokens-per-second throughput, as you’d expect. However, the throughput doesn’t scale linearly with the number of concurrent jobs. It jumped by only 7× when the number of concurrent requests moved from 1 to 32.\n\nI was also surprised to see that both TTFT and TPOT increase significantly as you batch more requests. Going from handling requests serially up to batching 32 at once increased the median TTFT and TPOT by about 6.5× and 2.7×, respectively.\n\nBased on this trend, I’d assume that as you increase the number of concurrent requests, you’d reach a point where both TTFT and TPOT are high enough to degrade the user experience for a chat application.\n\n## Takeaways and Future Work[#](#takeaways-and-future-work)\n\nFor chat applications, I’ve learned that limiting the number of concurrent jobs is necessary to hit a sweet spot between latency and throughput. However, for long-running asynchronous tasks, maximizing throughput is the ideal target.\n\nThere is one thing I’d like to understand better in future work: What underlying mechanisms are driving the dynamics I observed here? I’d like to get to the root of how and why the performance metrics I measured scale the way they do.", "url": "https://wpnews.pro/news/what-i-learned-from-load-testing-vllm-on-colab-s-free-t4-gpu", "canonical_source": "https://bryananthonio.com/blog/what-i-learned-from-load-testing-vllm-on-colabs-free-t4-gpu/", "published_at": "2026-11-27 00:00:00+00:00", "updated_at": "2026-11-27 18:44:46.585907+00:00", "lang": "en", "topics": ["ai-infrastructure", "large-language-models"], "entities": ["vLLM", "Google Colab", "Nvidia T4", "Qwen2.5-0.5B-Instruct", "Qwen"], "also_reported_by": [], "takeaway": "On a free Colab T4 serving Qwen2.5-0.5B-Instruct, vLLM at 32 prompts and max concurrency 1 produced 149.83 output tokens/s with median TTFT of 51.49 ms and median TPOT of 6.05 ms, showing workload tuning trades latency against throughput.", "recommendation": {"advice": "Benchmark with `vllm bench serve` using fixed random input/output lengths and `--ignore-eos` so every request generates the same token count, then compare median TTFT and TPOT across concurrency levels before tuning.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/what-i-learned-from-load-testing-vllm-on-colab-s-free-t4-gpu", "markdown": "https://wpnews.pro/news/what-i-learned-from-load-testing-vllm-on-colab-s-free-t4-gpu.md", "text": "https://wpnews.pro/news/what-i-learned-from-load-testing-vllm-on-colab-s-free-t4-gpu.txt", "jsonld": "https://wpnews.pro/news/what-i-learned-from-load-testing-vllm-on-colab-s-free-t4-gpu.jsonld"}}