<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Capacity-Planning on lo0 — Tech Blog</title><link>https://blog.lo0.es/en/tags/capacity-planning/</link><description>Recent content in Capacity-Planning on lo0 — Tech Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 12 Sep 2026 06:00:00 +0200</lastBuildDate><atom:link href="https://blog.lo0.es/en/tags/capacity-planning/index.xml" rel="self" type="application/rss+xml"/><item><title>Sizing for agents: 275 input tokens for every output token, and why the bottleneck is still decode</title><link>https://blog.lo0.es/en/posts/sizing-agents-decode-bottleneck/</link><pubDate>Sat, 12 Sep 2026 06:00:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/sizing-agents-decode-bottleneck/</guid><description>&lt;blockquote>
&lt;p>Seventh article in the operational track of the control layer. &lt;a href="https://blog.lo0.es/en/posts/humans-agents-same-gateway-priority-traffic-separation/">The fourth&lt;/a> dealt with the coexistence of human traffic and agentic traffic on a fixed fleet. This one deals with the prior question: how big the fleet has to be, and how big the gateway in front of it. Verified against LiteLLM 1.102.0 (commit of 11 September 2026) and vLLM 0.29.0, with load data published between May and September 2026.&lt;/p>
&lt;/blockquote>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>Until this year, sizing for agents meant extrapolating a chat profile and adding margin. In 2026 the first production-scale characterisations were published and the profile turned out to be something else. These are the seven conclusions.&lt;/p>
&lt;p>&lt;strong>The median prompt of an agentic call is 68,000 tokens, of which 63,000 arrive cached.&lt;/strong> The measurement covers 13.5 million sessions, 3.2 million users, 760.5 million model calls and 44.9 trillion prompt tokens in one week of June 2026. The median input-to-output ratio exceeds 275 to 1. Any calculation done on a profile of 800 prompt tokens and 250 output tokens describes a different system.&lt;/p>
&lt;p>&lt;strong>The load is prefill-dominant when counting tokens and decode-dominant when counting time.&lt;/strong> The genuinely new tokens that have to be prefilled on each turn are only between 1.5 and 7.3 times the output, not 275. With the prefix cache working, the split of execution time runs from 91 % to 98.6 % in decode. You size by memory bandwidth and by KV cache capacity, not by prefill FLOPs.&lt;/p>
&lt;p>&lt;strong>The sizing risk is not the average, it is the collapse of the prefix cache.&lt;/strong> The median hit rate within a turn is 98 %, it falls to 55 % at the boundary between turns and to 8 % when the client changes model. With dynamically retrieved context, prefix reuse drops to 1 %. One miss turns 142,000 prefix tokens into real prefill. Session affinity per replica stops being an optimisation and becomes a capacity requirement.&lt;/p>
&lt;p>&lt;strong>The intra-turn concurrency measured in production is 1.15 at the median and 1.4 at the 90th percentile.&lt;/strong> 93 % of tool batches contain a single invocation. The image of the agent opening twenty calls in parallel does not appear in the data. The real multiplier comes from the duty cycle and from the fact that 87 % of calls are started by the agent, not by the person.&lt;/p>
&lt;p>&lt;strong>The gateway is sized per worker, and each worker is a universe.&lt;/strong> One vCPU and 4 GiB per worker, with requests equal to limits. The limit counters, the caches and the cooldowns live in the worker&amp;rsquo;s memory unless there is Redis, so a limit of 100 requests per minute with four workers and three replicas allows 1,200. The Prisma pool is also per process: the number of connections open against Postgres is workers times &lt;code>connection_limit&lt;/code>.&lt;/p>
&lt;p>&lt;strong>The CPU cost that grows with agentic load is the token counter.&lt;/strong> It serialises the entire tool catalogue on every request and tokenises it. The project itself measured 46, 53 and 100 ms for prompts of 50K, 75K and 100K tokens, and the operation passes through a concurrency limiter of four per worker. With agents sending long catalogues and six-figure contexts, that limit is the ceiling before the CPU is.&lt;/p>
&lt;p>&lt;strong>Autoscaling by memory does not work on this piece and the startup probe takes five minutes.&lt;/strong> The official chart deliberately leaves memory without a target because Prisma&amp;rsquo;s query engine never returns the maximum reached. That leaves CPU at 60 %, with a &lt;code>startupProbe&lt;/code> of 300 seconds that makes any new replica arrive late. For agents there are two better metrics, and they are in &lt;code>/metrics&lt;/code>.&lt;/p>
&lt;h2 id="you-are-here-the-arithmetic-that-comes-before-buying">You are here: the arithmetic that comes before buying&lt;/h2>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">Classic capacity planning&lt;/a> starts from a chat SLO and crosses two budgets, the VRAM one and the time one. That method is still correct. What changes with agents are the inputs: the prompt length, the number of calls per unit of human work, the split between prefill and decode, and the very definition of an SLO. This article replaces those inputs with measured figures and drags the result through to two numbers: gateway replicas and GPUs.&lt;/p>
&lt;p>Out of scope is the splitting of traffic once it is built, which was already covered by &lt;a href="https://blog.lo0.es/en/posts/humans-agents-same-gateway-priority-traffic-separation/">the coexistence of humans and agents&lt;/a> and &lt;a href="https://blog.lo0.es/en/posts/prefix-routing-what-litellm-does-not-do/">prefix routing&lt;/a>.&lt;/p>
&lt;h2 id="the-analogy-the-repair-shop-and-the-front-desk">The analogy: the repair shop and the front desk&lt;/h2>
&lt;p>An appliance repair shop sizes its staff by counting faults, not phone calls. The difference matters because the person who brings in the washing machine occupies the front desk for three minutes, while the technician who takes it apart goes back to consult the machine&amp;rsquo;s data sheet fourteen times over the afternoon. If the shop manager sizes by visits to the front desk, they end up short of technicians and overstaffed at reception.&lt;/p>
&lt;p>The inference platform has the same asymmetry. The person sends one turn. The agent sends fifteen calls for that turn, and each one drags along the complete file of everything done so far. The front desk is the gateway and the technicians are the GPUs, and the usual mistake is to size both with the same counter.&lt;/p>
&lt;p>There is a second detail the analogy captures well. The technician does not read the whole data sheet each time: they have it open on the bench. That is the prefix cache. The day somebody moves them to a different bench between consultations, they have to fetch it from the archive again, and the work multiplies without the number of faults having increased.&lt;/p>
&lt;h2 id="part-1-the-real-load-profile">Part 1. The real load profile&lt;/h2>
&lt;p>For two years, any capacity calculation for agents was done on assumptions. In 2026 three pieces of work appeared that measure the matter, and it is worth reading them together because they measure different scaffolds and their figures are not averageable.&lt;/p>
&lt;h3 id="the-three-sources">The three sources&lt;/h3>
&lt;p>The characterisation at scale was published by a research team working on GitHub Copilot production telemetry (&lt;a href="https://arxiv.org/html/2608.00101v1">arXiv 2608.00101&lt;/a>, 30 July 2026): 13.5 million sessions, 3.2 million users, 95.1 million user turns, 760.5 million model calls and 44.9 trillion prompt tokens, in one week of June 2026. It is the largest sample published to date.&lt;/p>
&lt;p>The characterisation by benchmark suites comes from an architecture team (&lt;a href="https://arxiv.org/html/2605.26297">arXiv 2605.26297&lt;/a>, 25 May 2026), which instruments five of them (ADE-Bench, DABStep, GAIA, SWE-bench Pro and Terminal-Bench 2.0) and measures the internal split of time.&lt;/p>
&lt;p>The production measurement on a different scaffold was published by the vLLM project itself together with AgentX (&lt;a href="https://vllm.ai/blog/2026-09-08-vllm-agentx">vLLM blog&lt;/a>, 8 September 2026).&lt;/p>
&lt;p>The three disagree on turns per session: 15 calls at Copilot&amp;rsquo;s median, 43 turns in AgentX, 62.4 in SWE-bench Pro with Qwen. It is not a contradiction, they are scaffolds with different loops. The sizing lesson is that the number of calls per unit of human work depends on the client that connects, and that is why you have to measure it at home before fixing the size.&lt;/p>
&lt;h3 id="the-figures-you-can-actually-use">The figures you can actually use&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Quantity&lt;/th>
&lt;th>Measured value&lt;/th>
&lt;th>Source&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Median prompt per call&lt;/td>
&lt;td>68K tokens, 63K of them cached&lt;/td>
&lt;td>2608.00101&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Input:output ratio (median)&lt;/td>
&lt;td>above 275:1&lt;/td>
&lt;td>2608.00101&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Median session&lt;/td>
&lt;td>3 user turns, 15 calls, 4.2 min&lt;/td>
&lt;td>2608.00101&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Mean session&lt;/td>
&lt;td>6.1 turns, 40.6 calls, 62.6 min&lt;/td>
&lt;td>2608.00101&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Calls per turn (median)&lt;/td>
&lt;td>4.5&lt;/td>
&lt;td>2608.00101&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Calls started by the agent&lt;/td>
&lt;td>87 %&lt;/td>
&lt;td>2608.00101&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Range across user profiles&lt;/td>
&lt;td>50× (23K to 1.1M tokens per turn)&lt;/td>
&lt;td>2608.00101&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Median input context&lt;/td>
&lt;td>142K tokens; output 444 tokens per turn&lt;/td>
&lt;td>AgentX&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Accumulated context in SWE-bench Pro&lt;/td>
&lt;td>mean 68.7 to 80.1K, maximum 146 to 166K&lt;/td>
&lt;td>2605.26297&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Reasoning tokens over the output&lt;/td>
&lt;td>29.0 % to 67.6 %&lt;/td>
&lt;td>2605.26297&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Two operational observations come out of that and appear in no sizing guide.&lt;/p>
&lt;p>The first: &lt;strong>agents that fail accumulate up to 1.8 times more average context than those that finish well&lt;/strong> (2605.26297). The cost does not correlate with success, it correlates with difficulty and with getting stuck. A sizing done on the task that goes well falls short.&lt;/p>
&lt;p>The second: the range across user profiles is 50 to 1. A user who only converses spends 23,000 tokens per turn; one who leaves the agent in a long loop spends 1.1 million. Segmenting by usage profile pays off more than any difficulty-based routing, because the variance is in the people, not in the requests.&lt;/p>
&lt;h3 id="what-to-measure-before-calculating">What to measure before calculating&lt;/h3>
&lt;p>Three of your own figures, taken from a week of real traffic, are worth more than any table in this article:&lt;/p>
&lt;ol>
&lt;li>Model calls per hour of human work, by user profile.&lt;/li>
&lt;li>Prompt length distribution (median and 95th percentile), not the mean.&lt;/li>
&lt;li>Aggregate prefix cache hit rate, with the time series, not the single number.&lt;/li>
&lt;/ol>
&lt;p>All three come from what the gateway already stores. In &lt;code>LiteLLM_SpendLogs&lt;/code> you have the tokens per request and the key and team identifiers; in &lt;code>proxy_server_request&lt;/code> you have the &lt;code>tools&lt;/code> block of each call; and in vLLM&amp;rsquo;s &lt;code>/metrics&lt;/code> you have &lt;code>vllm:prefix_cache_queries&lt;/code> and &lt;code>vllm:prefix_cache_hits&lt;/code>.&lt;/p>
&lt;h2 id="part-2-prefill-decode-and-the-cache-trap">Part 2. Prefill, decode and the cache trap&lt;/h2>
&lt;p>Here is the finding that corrects almost everyone&amp;rsquo;s intuition, including mine when I started this article.&lt;/p>
&lt;p>Counting tokens, agentic load is overwhelmingly input: 275 to 1. The apparently obvious conclusion would be to size by prefill capacity, that is by FLOPs. It is false.&lt;/p>
&lt;p>What has to be prefilled on each turn is not the whole prompt, but what was added since the previous turn. That addition, measured, sits between 1.5 and 7.3 times the output length (2605.26297). The rest is served by the prefix cache. And the real split of the model&amp;rsquo;s execution time comes out like this: &lt;strong>between 91.0 % and 98.6 % in decode, between 1.4 % and 9.0 % in prefill&lt;/strong> (2605.26297).&lt;/p>
&lt;p>The hit rate that sustains that split is high and has been measured in three places: theoretical from 87.9 % to 99.3 % and empirical from 84.6 % to 99.5 % (2605.26297); above 96 % in production (AgentX); and a median of 98 % within a turn in Copilot (2608.00101).&lt;/p>
&lt;h3 id="where-it-falls-over">Where it falls over&lt;/h3>
&lt;p>The same Copilot work measures the degradation, and it is the most actionable figure in the article:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>98 %&lt;/strong> median hit rate within a turn. The detail matters: the first call of a turn hits around 45 %, the second rises to 86 % and from the third onwards it stabilises between 92 % and 94 %.&lt;/li>
&lt;li>&lt;strong>55 %&lt;/strong> at the boundary between turns, with idle gaps of 4.1 minutes at the median.&lt;/li>
&lt;li>&lt;strong>8 %&lt;/strong> when the client changes model.&lt;/li>
&lt;/ul>
&lt;p>And there is a fourth, worse regime: with dynamically retrieved context, that is when the scaffold injects search or RAG results that change on every iteration, prefix reuse falls to 1 % or less (&lt;a href="https://arxiv.org/html/2608.15127">arXiv 2608.15127&lt;/a>, 15 August 2026).&lt;/p>
&lt;p>A cache miss with a context of 142,000 tokens turns a prefill of a few thousand tokens into a six-figure one. The work multiplies by a factor of between 20 and 60 without the number of requests having changed. That is the difference between a fleet that meets its targets and one that seizes up mid-afternoon.&lt;/p>
&lt;p>Two sizing rules come from that:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Without session affinity towards the same replica, the calculated sizing is worthless.&lt;/strong> LiteLLM&amp;rsquo;s concrete mechanism is &lt;code>session_affinity&lt;/code>, which is not active by default and which was already covered &lt;a href="https://blog.lo0.es/en/posts/prefix-routing-what-litellm-does-not-do/">in the prefix routing article&lt;/a>. Without it, the calculation has to be redone assuming a prefill regime, which is between 20 and 60 times more expensive.&lt;/li>
&lt;li>&lt;strong>Changing model halfway through a session costs the entire cache.&lt;/strong> Any difficulty-based routing policy that moves a live conversation from one model group to another pays an 8 % hit rate on the next call. If you want to route by difficulty, do it at the start of the session.&lt;/li>
&lt;/ol>
&lt;h3 id="co-batching-which-is-the-other-effect-nobody-measures">Co-batching, which is the other effect nobody measures&lt;/h3>
&lt;p>Mixing a short request into the same batch as long-context requests degrades the short one&amp;rsquo;s inter-token latency. The measured figure: &lt;strong>one long request in the batch raises time per token by 38.3 %; two raise it by 79.7 %&lt;/strong> (2608.15127). It is the technical reason why separating human and agent pools improves the human experience more than the capacity split suggests, and it is also the reason not to raise &lt;code>--max-num-seqs&lt;/code> above what the KV budget allows.&lt;/p>
&lt;h2 id="part-3-the-kv-budget-with-the-numbers-of-the-agentic-case">Part 3. The KV budget, with the numbers of the agentic case&lt;/h2>
&lt;p>The formula does not change with respect to &lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">classic capacity planning&lt;/a>, but the inputs do, and the result is surprising:&lt;/p>
$$\text{KV}_{\text{bytes/token}} = 2 \times n_{\text{layers}} \times n_{\text{kv heads}} \times d_{\text{head}} \times \text{bytes}_{\text{elem}}$$
&lt;p>For a 70B-class geometry (80 layers, 8 KV heads with grouped attention, head dimension 128, 2-byte elements) that gives 0.3125 MiB per token. With the median agentic context of 142,000 tokens:&lt;/p>
$$142{,}000 \times 0.3125\ \text{MiB} \approx 43.3\ \text{GiB per sequence}$$
&lt;p>For a 30B-class geometry (48 layers, everything else the same) that gives 0.1875 MiB per token, that is around 26.0 GiB per sequence.&lt;/p>
&lt;p>It is worth pausing on what that means. An 80 GB H100 with the weights of a 70B model in FP8 already taking up space does not have 43 GiB free for a single sequence. The conclusion is harsh and has to be written down: &lt;strong>serving real 70B-class agentic context demands tensor parallelism of at least 2 and a quantised KV cache&lt;/strong>. And the number of simultaneous sequences that fit, which is what sets &lt;code>--max-num-seqs&lt;/code>, comes from dividing the available KV by that figure, not from a chat heuristic.&lt;/p>
$$\text{sequences} \approx \frac{\text{VRAM}_{\text{KV available}}}{\text{KV}_{\text{bytes/token}} \times \text{max context}}$$
&lt;p>With FP8 in the KV, the divisor halves. It is the cheapest capacity lever there is in this load profile, and its cost in quality is validated with evals, not assumed.&lt;/p>
&lt;h2 id="part-4-from-people-to-concurrent-requests">Part 4. From people to concurrent requests&lt;/h2>
&lt;p>This is where most calculations overshoot, because it is assumed that an agent equals many simultaneous requests. The data says otherwise.&lt;/p>
&lt;p>The concurrency of calls within a turn, measured in production, is &lt;strong>1.15 at the median and 1.4 at the 90th percentile&lt;/strong>, and 93 % of tool batches contain a single invocation (2608.00101). Intra-turn parallelism is small. Subagents appear in 44 % of AgentX sessions, with a median of 4 deployments among those that use them, so there is a long tail, but it is not the usual regime.&lt;/p>
&lt;p>What does multiply is the duty cycle. The mean session lasts 62.6 minutes and contains 40.6 calls. At 444 output tokens and an interactivity of around 60 tokens per second, each call occupies around 7.4 seconds of decode, which gives between 5 and 7 active minutes out of those 62.6.&lt;/p>
$$C = D \times \rho \times A$$
&lt;p>where $D$ is the people working, $\rho$ the duty cycle and $A$ the amplification. With $\rho \approx 0.10$ to $0.12$ derived from the previous figures, twenty developers give between 2 and 2.4 concurrent sequences in the steady state. It is the peak, not the average, that has to be sized for.&lt;/p>
&lt;h3 id="the-amplification">The amplification&lt;/h3>
&lt;p>Three factors published separately:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Tool failures&lt;/strong>: 9 % of turns trigger them, with a compute amplification of 4 times (2608.00101).&lt;/li>
&lt;li>&lt;strong>Subagents&lt;/strong>: 44 % of sessions, median of 4 deployments (AgentX).&lt;/li>
&lt;li>&lt;strong>Internal variance&lt;/strong>: the same task from the same agent varies by up to 30 times in cost within a single trace (2608.15127).&lt;/li>
&lt;/ul>
&lt;p>The product of the first two gives $(1 + 0.09 \times 3) \times (1 + 0.44 \times 3) \approx 2.9$. Nobody publishes that product as a single figure, so it is flagged as my own derivation, but &lt;strong>an amplification factor of 3 is the reasonable design provision&lt;/strong> and it fits the measured variance.&lt;/p>
&lt;p>For the twenty developers in the example: between 6 and 7 concurrent design sequences, with 142K contexts. At 43.3 GiB of KV per sequence in the 70B class, that is around 300 GiB of KV cache, that is four H100s dedicated to KV alone with the weights on top. With KV in FP8, half. With a 30B-class model, a third.&lt;/p>
&lt;p>That calculation, done with the chat profile of 800 prompt tokens, would have given a single GPU. That is the distance between the two regimes.&lt;/p>
&lt;h2 id="part-5-the-gateway-which-also-has-to-be-sized">Part 5. The gateway, which also has to be sized&lt;/h2>
&lt;p>The proxy consumes no GPU, but it has its own arithmetic and it is the part that produces the most surprises in production, because almost all of its state is per process.&lt;/p>
&lt;h3 id="a-worker-is-a-universe">A worker is a universe&lt;/h3>
&lt;p>The default value of &lt;code>--num_workers&lt;/code> is &lt;strong>1&lt;/strong> (&lt;code>litellm/constants.py:57&lt;/code>). The usual startup is uvicorn directly with uvloop (&lt;code>proxy_cli.py:1477&lt;/code>), and there are alternatives with gunicorn, hypercorn and granian.&lt;/p>
&lt;p>What lives in each worker&amp;rsquo;s memory, and therefore multiplies:&lt;/p>
&lt;ul>
&lt;li>The in-memory cache, limited to &lt;strong>200 elements&lt;/strong> with a TTL of 600 seconds (&lt;code>litellm/caching/in_memory_cache.py:27&lt;/code>). With many deployments, the cooldowns and the counters compete for that same space and get evicted before they expire.&lt;/li>
&lt;li>The key authentication cache, with a TTL of &lt;strong>60 seconds&lt;/strong> (&lt;code>proxy_server.py:1650&lt;/code>), adjustable with &lt;code>general_settings.user_api_key_cache_ttl&lt;/code>.&lt;/li>
&lt;li>The limit and budget counters when there is no Redis (&lt;code>parallel_request_limiter_v3.py&lt;/code>, &lt;code>local_only=True&lt;/code> paths).&lt;/li>
&lt;li>The router cooldowns, with &lt;code>DEFAULT_COOLDOWN_TIME_SECONDS = 5&lt;/code> (&lt;code>constants.py:75&lt;/code>).&lt;/li>
&lt;li>A periodic task scheduler of its own per worker (&lt;code>proxy_server.py:9674&lt;/code>), coordinated between pods with a lock in Redis.&lt;/li>
&lt;/ul>
&lt;p>The practical consequence: &lt;strong>a limit of 100 requests per minute with four workers and three replicas allows up to 1,200 without Redis&lt;/strong>. With Redis, the v3 limiter registers seven Lua scripts at startup (&lt;code>parallel_request_limiter_v3.py:608&lt;/code>) and the limits become global.&lt;/p>
&lt;p>One detail of the v3 limiter that matters with agentic load: &lt;code>LITELLM_TPM_TOKEN_RESERVATION_ENABLED&lt;/code> comes enabled by default and reserves estimated tokens before the call, which adds a round trip to Redis per request. And there is an &lt;code>asyncio.Lock&lt;/code> per instance that serialises the atomic batch checks (&lt;code>:665&lt;/code>), documented by the code itself as a 99th-percentile risk under contention.&lt;/p>
&lt;p>If Redis goes down, requests do not fail: there is a circuit breaker with a threshold of 5 failures and a recovery of 60 seconds (&lt;code>constants.py:456&lt;/code>), and the proxy degrades to local memory. What is lost silently is the globality of the limits.&lt;/p>
&lt;h3 id="postgres">Postgres&lt;/h3>
&lt;p>The pool is also per process. The default values are &lt;code>database_connection_pool_limit = 10&lt;/code> and &lt;code>database_connection_pool_timeout = 60&lt;/code> (&lt;code>proxy_cli.py:62&lt;/code>), injected as parameters of the Prisma URL. A pod with four workers opens forty connections. Three pods, one hundred and twenty. It is the fast route to exhausting Postgres&amp;rsquo;s &lt;code>max_connections&lt;/code> without having served any traffic, and the reason the official chart offers PgBouncer inside the pod itself with &lt;code>maxDbConnections: 20&lt;/code> and &lt;code>maxClientConn: 1000&lt;/code>.&lt;/p>
&lt;p>On the request path there is only the authentication, which is cached for 60 seconds, and the rate limiting. Spend is deferred. The &lt;code>SpendLogs&lt;/code> queue is capped at &lt;strong>64 MB&lt;/strong> and on overflow it discards the oldest elements with an error in the log (&lt;code>utils.py:6704&lt;/code>). The write interval is &lt;code>proxy_batch_write_at&lt;/code>, with a default value of 10 seconds plus a random spread of up to 5 (&lt;code>constants.py:1719&lt;/code>, &lt;code>proxy_server.py:9704&lt;/code>); the production guide recommends raising it to 60.&lt;/p>
&lt;p>With a slow Postgres, the queue grows to those 64 MB and then loses billing data without returning any error to the client. It is the silent failure mode you have to alert on.&lt;/p>
&lt;h3 id="the-token-counter-which-is-the-agentic-trap">The token counter, which is the agentic trap&lt;/h3>
&lt;p>This is the piece that turns a correct sizing into an insufficient one, and it appears in no guide.&lt;/p>
&lt;p>Before admitting a request, the proxy counts tokens. With chat load the cost is negligible. With agentic load it is not, for two reasons that add up.&lt;/p>
&lt;p>The first is the prompt length. The project itself measured the admission counting cost at &lt;strong>46, 53 and 100 ms for prompts of 50K, 75K and 100K tokens&lt;/strong> (&lt;a href="https://docs.litellm.ai/docs/benchmarks">benchmarks&lt;/a>, consulted on 12 September 2026), and published that with a counter written in Rust those figures fall to 4.9, 6.8 and 10.2 ms.&lt;/p>
&lt;p>The second is the tool catalogue. The function that prepares the definitions serialises the entire catalogue to a pseudo-TypeScript and tokenises it (&lt;code>litellm_core_utils/token_counter.py:934&lt;/code>), plus nine fixed tokens. The cost is linear in the size of the catalogue and it is paid on every request. That is exactly the pattern of an agent connected to an MCP gateway: a long catalogue, resent on every turn. The token bill of that catalogue was already covered &lt;a href="https://blog.lo0.es/en/posts/litellm-mcp-gateway-second-front-door/">in the MCP gateway article&lt;/a>; here its other face appears, which is proxy CPU.&lt;/p>
&lt;p>And on top of that there is an explicit ceiling. The counting runs in a thread with a capacity limiter whose default value is &lt;strong>4 per worker&lt;/strong> (&lt;code>token_counter.py:340&lt;/code>, &lt;code>constants.py:407&lt;/code>). With 100K prompts, four concurrent counts of 100 ms mean a theoretical ceiling of around 40 admissions per second per worker before the limiter starts queueing, and that is without having called the model yet.&lt;/p>
&lt;p>What is cached is the tokeniser, with an LRU of &lt;strong>64&lt;/strong> entries (&lt;code>utils.py:2206&lt;/code>), not the result of the count.&lt;/p>
&lt;p>Three levers, in order of return: raise &lt;code>TOKEN_COUNTER_MAX_CONCURRENT_COUNTS&lt;/code> if CPU is spare, reduce the tool catalogue exposed per key, and watch the gateway overhead figure in &lt;code>/metrics&lt;/code> to know whether this is happening.&lt;/p>
&lt;h3 id="streaming-and-admission">Streaming and admission&lt;/h3>
&lt;p>There is no connection limit by default. &lt;code>--limit_concurrency&lt;/code> exists but is optional, and it returns 503. The built-in admission control is only activated if &lt;code>general_settings.max_in_flight_requests_per_worker&lt;/code> is defined (&lt;code>middleware/admission_control_middleware.py:285&lt;/code>), with &lt;code>max_queued_requests_per_worker&lt;/code> and &lt;code>admission_queue_timeout_seconds&lt;/code> at 1.0 by default, rejecting with 503 and a &lt;code>retry-after: 1&lt;/code> header.&lt;/p>
&lt;p>For agents, that header matters: an agentic client that retries without respecting it multiplies the load exactly when the gateway is saying it cannot take any more. The combination of gateway retries was already calculated by &lt;a href="https://blog.lo0.es/en/posts/humans-agents-same-gateway-priority-traffic-separation/">the fourth article&lt;/a> and it reached 45 calls per turn in the worst case.&lt;/p>
&lt;p>The default request timeout is &lt;strong>6,000 seconds&lt;/strong> (&lt;code>constants.py:512&lt;/code>). The production guide recommends 600. With long agentic tasks, leaving it at 6,000 means a hung connection occupies a slot for an hour and a half.&lt;/p>
&lt;h3 id="resources-and-autoscaling">Resources and autoscaling&lt;/h3>
&lt;p>The official chart recommends &lt;strong>1 vCPU and 4 GiB per worker, with requests equal to limits&lt;/strong> (&lt;code>helm/litellm-helm/values.yaml:235&lt;/code>), and the production documentation suggests one worker per pod scaling horizontally. The project&amp;rsquo;s own high-performance benchmark, by contrast, uses four workers per pod with PgBouncer in front.&lt;/p>
&lt;p>The HPA comes with &lt;code>targetCPUUtilizationPercentage: 60&lt;/code>. And there is a comment in the chart worth reading twice: &lt;strong>memory is deliberately left without a target&lt;/strong> because the resident consumption of Prisma&amp;rsquo;s query engine is a high-water mark that is never returned, so that an HPA on memory would add replicas and never remove them (&lt;code>values.yaml:260&lt;/code>).&lt;/p>
&lt;p>The other problem is startup. The &lt;code>startupProbe&lt;/code> has &lt;code>failureThreshold: 30&lt;/code> with a period of 10 seconds, that is &lt;strong>up to 300 seconds&lt;/strong> before the pod is considered ready (&lt;code>values.yaml:109&lt;/code>). An HPA that reacts at 60 % CPU and takes five minutes to add capacity arrives late to any agentic burst.&lt;/p>
&lt;p>The alternative, optional in the chart, is to scale by Prometheus metrics: &lt;code>targetRequestsPerSecond&lt;/code> and &lt;code>targetTokensPerSecond&lt;/code> over &lt;code>rate(litellm_proxy_total_requests_metric_total[1m])&lt;/code> and &lt;code>rate(litellm_total_tokens_metric_total[1m])&lt;/code>. The chart itself warns that the token metric lags with long streaming responses, because tokens are accounted for on completion. For agents, that is almost always.&lt;/p>
&lt;h2 id="part-6-what-to-watch-the-metrics-that-work-and-the-ones-that-broke">Part 6. What to watch: the metrics that work and the ones that broke&lt;/h2>
&lt;h3 id="at-the-gateway">At the gateway&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Metric&lt;/th>
&lt;th>What for&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>litellm_in_flight_requests&lt;/code>&lt;/td>
&lt;td>Real saturation per worker. It is the scaling metric&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>litellm_overhead_latency_metric&lt;/code>&lt;/td>
&lt;td>Proxy cost per request; it rises with token counting&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>litellm_overhead_with_guardrails_latency_metric&lt;/code>&lt;/td>
&lt;td>The same including guardrails&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>litellm_request_queue_time_seconds&lt;/code>&lt;/td>
&lt;td>Arrival through to pre-call, includes authentication and ASGI queueing&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>litellm_deployment_cooled_down&lt;/code>&lt;/td>
&lt;td>Replicas out of the pool&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>litellm_service_latency&lt;/code>&lt;/td>
&lt;td>Redis and database latency, per service&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The &lt;code>/health/backlog&lt;/code> endpoint returns &lt;code>in_flight_requests&lt;/code>, &lt;code>admitted_requests&lt;/code>, &lt;code>queued_requests&lt;/code> and &lt;code>rejected_requests&lt;/code> (&lt;code>health_endpoints/_health_endpoints.py:1871&lt;/code>).&lt;/p>
&lt;p>What it does &lt;strong>not&lt;/strong> expose: the depth of the &lt;code>SpendLogs&lt;/code> queue or its bytes, the Prisma connections in use against the limit, nor the depth of the logging worker&amp;rsquo;s queue. All three are real failure modes and have to be instrumented from outside.&lt;/p>
&lt;h3 id="at-the-engine">At the engine&lt;/h3>
&lt;p>Names verified in the vLLM 0.29.0 metrics documentation:&lt;/p>
&lt;ul>
&lt;li>&lt;code>vllm:num_requests_running&lt;/code>, &lt;code>vllm:num_requests_waiting&lt;/code>&lt;/li>
&lt;li>&lt;code>vllm:time_to_first_token_seconds&lt;/code>, &lt;code>vllm:e2e_request_latency_seconds&lt;/code>, &lt;code>vllm:request_queue_time_seconds&lt;/code>, &lt;code>vllm:inter_token_latency_seconds&lt;/code>&lt;/li>
&lt;li>&lt;code>vllm:prefix_cache_queries&lt;/code>, &lt;code>vllm:prefix_cache_hits&lt;/code>, &lt;code>vllm:kv_cache_usage_perc&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>And the ones that break dashboards on upgrade:&lt;/p>
&lt;ul>
&lt;li>&lt;code>vllm:time_in_queue_requests&lt;/code> is duplicated by &lt;code>vllm:request_queue_time_seconds&lt;/code>.&lt;/li>
&lt;li>The direct prefix cache hit rate indicator disappeared. It is now computed as &lt;code>rate(vllm:prefix_cache_hits) / rate(vllm:prefix_cache_queries)&lt;/code>.&lt;/li>
&lt;li>&lt;code>vllm:num_requests_swapped&lt;/code> and &lt;code>vllm:cpu_cache_usage_perc&lt;/code> are deprecated along with CPU swapping.&lt;/li>
&lt;li>&lt;code>vllm:gpu_cache_usage_perc&lt;/code> became &lt;code>vllm:kv_cache_usage_perc&lt;/code>, which also breaks any HPA that uses it.&lt;/li>
&lt;/ul>
&lt;h3 id="the-slo-worth-chasing">The SLO worth chasing&lt;/h3>
&lt;p>A 95th percentile of time to first token describes nobody&amp;rsquo;s experience when the unit of work is 43 turns. Coding tasks frequently exceed ten minutes and research tasks reach hours (2608.15127).&lt;/p>
&lt;p>Two indicators serve better:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>90th percentile of full-task latency&lt;/strong>, measured per session, not per request. It comes from grouping &lt;code>LiteLLM_SpendLogs&lt;/code> by session identifier.&lt;/li>
&lt;li>&lt;strong>90th percentile of interactivity&lt;/strong>, in tokens per second per user. It is the one AgentX uses, with values between 58.3 and 74.2 in its runs.&lt;/li>
&lt;/ol>
&lt;p>To autoscale the engine, the official production-stack example uses &lt;code>vllm:num_requests_waiting&lt;/code> with a threshold of 5, polling every 15 seconds and a cooldown of 360. With agentic load it is worth adding &lt;code>vllm:kv_cache_usage_perc&lt;/code> as a second trigger, because with 26 to 43 GiB of KV per sequence the memory pressure arrives before the queue does.&lt;/p>
&lt;h2 id="part-7-the-engine-levers-ordered-by-return">Part 7. The engine levers, ordered by return&lt;/h2>
&lt;p>Verified against vLLM 0.29.0, released on 9 September 2026.&lt;/p>
&lt;p>&lt;strong>&lt;code>--long-prefill-token-threshold 512&lt;/code>.&lt;/strong> The AgentX measurement attributes to it &lt;strong>+93 % in tokens per GPU per second, with a 2.3-times improvement at the 90th percentile&lt;/strong>, by attacking the head-of-line blocking that a long prefill produces in front of short requests. It is the highest-return lever documented for this profile.&lt;/p>
&lt;p>&lt;strong>KV cache in FP8.&lt;/strong> It halves the memory budget per sequence, which is the limiting resource. Validate with evals.&lt;/p>
&lt;p>&lt;strong>&lt;code>--max-num-queued-reqs&lt;/code> and &lt;code>--max-num-queued-tokens&lt;/code>.&lt;/strong> New in 0.29. They are admission control in the engine, and they are the right mechanism to protect the SLO instead of letting the queue grow without limit.&lt;/p>
&lt;p>&lt;strong>&lt;code>max_num_batched_tokens&lt;/code> downwards.&lt;/strong> High values improve time to first token; low values improve inter-token latency. In a regime where 91 % of the time is decode, inter-token latency is what is perceived. Chunked prefill is enabled by default whenever possible in the V1 engine.&lt;/p>
&lt;p>&lt;strong>Session affinity at the gateway.&lt;/strong> It is not an engine setting, but it is what holds up everything above. Without it, that 98 % hit rate turns into random distribution across replicas.&lt;/p>
&lt;p>Two version warnings: Model Runner V2 becomes the default in 0.29 and V1 is deprecated with removal planned for 0.32; and starting with &lt;code>python -m vllm.entrypoints.openai.api_server&lt;/code> is deprecated.&lt;/p>
&lt;h2 id="the-full-calculation-from-start-to-finish">The full calculation, from start to finish&lt;/h2>
&lt;p>Case: twenty developers, a coding scaffold, a 30B-class model in the fleet, maximum context of 128K, KV in FP8.&lt;/p>
&lt;p>&lt;strong>1. Steady-state concurrency.&lt;/strong> $C = 20 \times 0.11 \times 3 \approx 6.6$ sequences.&lt;/p>
&lt;p>&lt;strong>2. KV budget per sequence.&lt;/strong> 0.1875 MiB per token in BF16, half in FP8, that is around 0.094 MiB. At 128K of context: around 12.0 GiB per sequence. For 6.6 sequences with margin, rounding to 8: 96 GiB of KV.&lt;/p>
&lt;p>&lt;strong>3. GPUs.&lt;/strong> The weights of a 30B in FP8 take up around 30 GB. On an 80 GB H100 with &lt;code>gpu_memory_utilization&lt;/code> of 0.90 there are around 72 GB usable per card. With tensor parallelism of 2, the weights are split: around 15 GB per GPU, so around 57 GB of KV per GPU and around 114 GB in the replica. That covers the 96 GiB calculated, and TP=2 also adds memory bandwidth, which is the resource that dominates decode. &lt;strong>Two H100s, one replica, TP=2.&lt;/strong> It is worth seeing the contrast: on a single H100 the full weights leave around 42 GB of KV, that is three and a half sequences, less than half of what is needed. With a second replica for availability and maintenance windows: four GPUs.&lt;/p>
&lt;p>&lt;strong>4. Requests per second at the gateway.&lt;/strong> 20 people, a mean session of 40.6 calls in 62.6 minutes, duty cycle included: of the order of 0.2 to 0.3 requests per second on average, with peaks of 2 to 3.&lt;/p>
&lt;p>&lt;strong>5. Gateway workers.&lt;/strong> The ceiling is not set by throughput but by token counting: four concurrent counts per worker, at 100 ms with long prompts. With peaks of 3 requests per second and six-figure prompts, &lt;strong>two replicas of one worker each&lt;/strong> cover the case with margin for the rolling update, at 1 vCPU and 4 GiB each. Postgres will see 20 connections.&lt;/p>
&lt;p>&lt;strong>6. What needs switching on.&lt;/strong> Session affinity, admission control at the gateway and at the engine, &lt;code>--long-prefill-token-threshold&lt;/code>, and Redis so that the limits are global.&lt;/p>
&lt;p>The same calculation with the chat profile would have given one GPU and one worker. The distance is not in the safety margin, it is in the inputs.&lt;/p>
&lt;h2 id="a-reference-configyaml">A reference &lt;code>config.yaml&lt;/code>&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">model_list&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">model_name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">agentes-30b&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">litellm_params&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">model&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">hosted_vllm/qwen3-coder-30b&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">api_base&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">http://vllm-agentes.inferencia.svc:8000/v1&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">rpm&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">600&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">model_info&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">input_cost_per_token&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0.00000018&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">output_cost_per_token&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0.00000072&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">router_settings&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">routing_strategy&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">simple-shuffle&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c"># without this, the capacity calculation in this article is worthless&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">optional_pre_call_checks&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s2">&amp;#34;session_affinity&amp;#34;&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">num_retries&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">2&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">allowed_fails&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">3&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">cooldown_time&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">30&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">general_settings&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c"># admission control: below this the queue grows without limit&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">max_in_flight_requests_per_worker&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">24&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">max_queued_requests_per_worker&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">48&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">admission_queue_timeout_seconds&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">1.0&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c"># the spend queue discards at 64 MB; shorter interval, less backlog&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">proxy_batch_write_at&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">60&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">enable_drain_endpoint&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kc">true&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">drain_endpoint_token&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">os.environ/DRAIN_TOKEN&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">database_connection_pool_limit&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">10&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">litellm_settings&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c"># 6000 s by default: a hung connection holds a slot for an hour and a half&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">request_timeout&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">600&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">callbacks&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s2">&amp;#34;langfuse_otel&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;prometheus&amp;#34;&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">cache&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kc">true&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">cache_params&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">type&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">redis&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">host&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">os.environ/REDIS_HOST&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">namespace&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">litellm&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Environment variables that go with it:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="nv">NUM_WORKERS&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="m">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nv">TOKEN_COUNTER_MAX_CONCURRENT_COUNTS&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="m">8&lt;/span> &lt;span class="c1"># default 4; raise only if CPU is spare&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nv">LITELLM_TPM_TOKEN_RESERVATION_ENABLED&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="nb">true&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nv">PROXY_CONFIG_RELOAD_INTERVAL_SECONDS&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="m">30&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>And on the engine side:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">vllm serve Qwen/Qwen3-Coder-30B &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --tensor-parallel-size &lt;span class="m">2&lt;/span> &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --max-model-len &lt;span class="m">131072&lt;/span> &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --kv-cache-dtype fp8 &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --long-prefill-token-threshold &lt;span class="m">512&lt;/span> &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --max-num-queued-reqs &lt;span class="m">64&lt;/span> &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --gpu-memory-utilization 0.90
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="checklist">Checklist&lt;/h2>
&lt;ol>
&lt;li>Measure three figures of your own over a week: calls per hour of human work and per profile, prompt length distribution, and the time series of prefix cache hit rate.&lt;/li>
&lt;li>Calculate the KV per sequence with the model&amp;rsquo;s real geometry, taken from its &lt;code>config.json&lt;/code>, not from a table.&lt;/li>
&lt;li>Set &lt;code>--max-num-seqs&lt;/code> from that budget, not from a chat heuristic.&lt;/li>
&lt;li>Switch on session affinity before accepting the calculated number of GPUs.&lt;/li>
&lt;li>Switch on admission control in both layers and check that the client respects &lt;code>retry-after&lt;/code>.&lt;/li>
&lt;li>Lower &lt;code>request_timeout&lt;/code> from 6,000 to 600.&lt;/li>
&lt;li>Raise &lt;code>proxy_batch_write_at&lt;/code> to 60 and alert on the growth of the spend queue from outside, because there is no metric.&lt;/li>
&lt;li>Leave the HPA on CPU at 60 %, never on memory, and assume the 300 seconds of the &lt;code>startupProbe&lt;/code> when planning the margin.&lt;/li>
&lt;li>Watch &lt;code>litellm_in_flight_requests&lt;/code> and &lt;code>litellm_overhead_latency_metric&lt;/code>; if the overhead rises with the size of the tool catalogue, the culprit is the token counter.&lt;/li>
&lt;li>Go over the dashboards for the vLLM metric renames before upgrading.&lt;/li>
&lt;li>Check that no routing policy moves a live session between model groups.&lt;/li>
&lt;li>Redo the calculation when a new user profile arrives: the range across profiles is 50 to 1.&lt;/li>
&lt;/ol>
&lt;h2 id="traps-and-things-that-are-not-what-they-seem">Traps and things that are not what they seem&lt;/h2>
&lt;p>&lt;strong>The ratio of 275 to 1 does not mean the system is prefill-bound.&lt;/strong> The new tokens per turn are between 1.5 and 7.3 times the output. The time is between 91 % and 98.6 % in decode.&lt;/p>
&lt;p>&lt;strong>The aggregate prefix cache hit rate hides the problem.&lt;/strong> An aggregate 90 % may be 98 % intra-turn and 55 % at boundaries. You have to look at the series, not the number, and segment by request type.&lt;/p>
&lt;p>&lt;strong>vLLM&amp;rsquo;s hit rate counts the reprefill after an eviction as a hit.&lt;/strong> The counter exists internally and is not exposed, so the published number is optimistic under a memory-pressure regime.&lt;/p>
&lt;p>&lt;strong>Agents that fail cost more than those that succeed&lt;/strong>, up to 1.8 times more context. Sizing on the task that goes well leaves the calculation short.&lt;/p>
&lt;p>&lt;strong>The database pool is per process, not per pod.&lt;/strong> Four workers are forty connections.&lt;/p>
&lt;p>&lt;strong>The HPA on memory does not work with this piece&lt;/strong>, and not because of a configuration mistake: Prisma&amp;rsquo;s query engine does not return the memory.&lt;/p>
&lt;p>&lt;strong>The 300-second &lt;code>startupProbe&lt;/code> turns any autoscaling into late reaction.&lt;/strong> For agentic peaks, it is better to over-provision than to trust the scaling.&lt;/p>
&lt;p>&lt;strong>Raising &lt;code>--max-num-seqs&lt;/code> to &amp;ldquo;make use of the GPU&amp;rdquo; degrades perceived latency&lt;/strong>: two long requests in the batch raise time per token by 79.7 %.&lt;/p>
&lt;p>&lt;strong>The token counter has a limiter of four per worker&lt;/strong> and it appears in no sizing guide. With large tool catalogues and long contexts it is the first ceiling you hit.&lt;/p>
&lt;p>&lt;strong>The figures in this article come from three different scaffolds and are not averageable.&lt;/strong> Fifteen, forty-three and sixty-two turns per session are three systems, not three measurements of the same one.&lt;/p>
&lt;h2 id="closing">Closing&lt;/h2>
&lt;p>The arithmetic of sizing has not changed. What has changed are the inputs, and now there are public measurements at scale instead of intuitions. Three figures sum up the change of regime: 68,000 tokens of median prompt, 87 % of calls started by the agent rather than by the person, and a time split that is decode for more than 90 % as long as the prefix cache hits.&lt;/p>
&lt;p>From that comes an order of work that is not the usual one. First, session affinity, because without it the rest of the calculation describes a different system. Second, the KV budget with the model&amp;rsquo;s real geometry, which is what sets how many sequences fit. Third, the gateway, where the ceiling is not throughput but a token counter with four threads per worker.&lt;/p>
&lt;p>And a warning about your own figures. The measured range across user profiles is 50 to 1. Any platform that does not segment its measurement by profile is averaging two different populations and producing a number that describes neither of them.&lt;/p>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/humans-agents-same-gateway-priority-traffic-separation/">Humans and agents on the same gateway&lt;/a>: coexistence on a fleet that is already sized.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/prefix-routing-what-litellm-does-not-do/">Prefix routing: what LiteLLM does not do&lt;/a>: the affinity mechanism on which this article&amp;rsquo;s entire calculation depends.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/litellm-mcp-gateway-second-front-door/">LiteLLM&amp;rsquo;s MCP gateway&lt;/a>: the other face of the tool catalogue, the one paid in tokens.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">Capacity planning for on-premise LLM inference&lt;/a>: the classic method whose inputs this article replaces.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/kv-cache-working-memory-llm-inference/">KV cache: fundamentals&lt;/a> and &lt;a href="https://blog.lo0.es/en/posts/prefix-cache-hit-rate-engineering/">prefix cache hit rate engineering&lt;/a>: the two pieces that dominate the budget.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/litellm-day-2-high-availability/">Day 2 of the proxy&lt;/a>: availability, draining and deployments.&lt;/li>
&lt;/ul>
&lt;h2 id="sources">Sources&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://arxiv.org/html/2608.00101v1">Agentic Coding in the Wild: Characterizing GitHub Copilot at Production Scale&lt;/a>, arXiv 2608.00101, 30 de julio de 2026.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/html/2605.26297">Agentic AI Workload Characteristics&lt;/a>, arXiv 2605.26297, 25 de mayo de 2026.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/html/2608.15127">From LLM Inference to Agentic Workloads&lt;/a>, arXiv 2608.15127, 15 de agosto de 2026.&lt;/li>
&lt;li>&lt;a href="https://vllm.ai/blog/2026-09-08-vllm-agentx">vLLM x AgentX: serving agentic workloads&lt;/a>, 8 de septiembre de 2026.&lt;/li>
&lt;li>&lt;a href="https://docs.vllm.ai/en/stable/design/metrics/">vLLM metrics design&lt;/a> y &lt;a href="https://docs.vllm.ai/en/stable/configuration/optimization/">optimization guide&lt;/a>, consultados el 12 de septiembre de 2026.&lt;/li>
&lt;li>&lt;a href="https://docs.litellm.ai/docs/benchmarks">LiteLLM benchmarks&lt;/a> y &lt;a href="https://docs.litellm.ai/docs/proxy/prod">production setup&lt;/a>, consultados el 12 de septiembre de 2026.&lt;/li>
&lt;li>Código de LiteLLM 1.102.0, commit &lt;code>9071ca50&lt;/code> del 11 de septiembre de 2026.&lt;/li>
&lt;li>&lt;a href="https://docs.vllm.ai/projects/production-stack/en/latest/use_cases/autoscaling-keda.html">Autoescalado con KEDA en vLLM production-stack&lt;/a>, consultado el 12 de septiembre de 2026.&lt;/li>
&lt;/ul></description></item><item><title>From the SLO to the number of GPUs: how to size and justify the investment in inference hardware</title><link>https://blog.lo0.es/en/posts/slo-to-number-of-gpus-sizing-justifying-inference-hardware/</link><pubDate>Tue, 16 Jun 2026 11:00:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/slo-to-number-of-gpus-sizing-justifying-inference-hardware/</guid><description>&lt;blockquote>
&lt;p>Notation: amounts in &lt;strong>N €&lt;/strong> or &lt;strong>N USD&lt;/strong> (source denominated in dollars); decimal point; comma as thousands separator (&lt;code>1{,}234&lt;/code>). Generic example hardware: 4×H100 SXM5 80 GB nodes. The dollar sign is not used (it is the formula delimiter).&lt;/p>
&lt;/blockquote>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;ul>
&lt;li>With an SLO of &lt;strong>TTFT P99 ≤ 300 ms&lt;/strong> and &lt;strong>ITL P99 ≤ 50 ms&lt;/strong> for a production chat, peak GPU utilisation must stay at &lt;strong>≤ 63 %&lt;/strong>.&lt;/li>
&lt;li>A service receiving &lt;strong>5M requests/day&lt;/strong> with 512 input tokens and 256 output tokens on average generates an hourly peak of &lt;strong>~11,600 tok/s&lt;/strong> (with a peak factor of 1.8×). With vLLM on H100 SXM5 (Llama-3.3 70B FP8, ~1,850 tok/s at 50 concurrent requests), &lt;strong>≥ 10 GPUs&lt;/strong> are needed at peak to meet the SLO, which translates into &lt;strong>3 4×H100 nodes&lt;/strong> (with headroom).&lt;/li>
&lt;li>The all-in cost of those 3 nodes is ~&lt;strong>83,300 € per year per node&lt;/strong> (3-year capex + base opex); the &lt;strong>€/1M tokens&lt;/strong> in the base scenario at 63 % utilisation is ~&lt;strong>0.37 €&lt;/strong>.&lt;/li>
&lt;li>Against AWS p5 on-demand (~3.90 USD/GPU-hour after the 44 % cut of Jun. 2025), the utilisation &lt;strong>break-even&lt;/strong> sits at &lt;strong>~55 %&lt;/strong>; against neocloud on-demand (~2.01 USD/GPU-hour), there is no feasible break-even at medium utilisation.&lt;/li>
&lt;li>Capex payback happens between &lt;strong>13 and 24 months&lt;/strong> if sustained utilisation exceeds 70 %.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="1-the-sizing-chain-from-demand-to-the-number-of-gpus">1. The sizing chain: from demand to the number of GPUs&lt;/h2>
&lt;p>Sizing an inference platform follows a causal chain of five steps. Each step has a formula; none can be skipped.&lt;/p>
&lt;h3 id="11-step-1--characterise-the-demand">1.1 Step 1 — Characterise the demand&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Parameter&lt;/th>
&lt;th>Symbol&lt;/th>
&lt;th>Example&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Requests per day (average)&lt;/td>
&lt;td>\(D\)&lt;/td>
&lt;td>5,000,000&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Input tokens per request (average)&lt;/td>
&lt;td>\(L_{\text{in}}\)&lt;/td>
&lt;td>512&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Output tokens per request (average)&lt;/td>
&lt;td>\(L_{\text{out}}\)&lt;/td>
&lt;td>256&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Peak factor (peak hour vs average ratio)&lt;/td>
&lt;td>\(k_{\text{peak}}\)&lt;/td>
&lt;td>1.8&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Hours per day with significant traffic&lt;/td>
&lt;td>\(H\)&lt;/td>
&lt;td>16&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The &lt;strong>average output throughput&lt;/strong>:&lt;/p>
$$\dot{T}_{\text{avg}} = \frac{D \times L_{\text{out}}}{86{,}400\,\text{s}} = \frac{5{,}000{,}000 \times 256}{86{,}400} \approx 14{,}815\;\text{tok/s}$$
&lt;p>The &lt;strong>peak throughput&lt;/strong> (busy hour):&lt;/p>
$$\dot{T}_{\text{peak}} = k_{\text{peak}} \times \frac{D \times L_{\text{out}}}{H \times 3{,}600} = 1.8 \times \frac{5{,}000{,}000 \times 256}{16 \times 3{,}600} \approx 40{,}000\;\text{tok/s}$$
&lt;blockquote>
&lt;p>Note: if the traffic profile has very pronounced peaks (peak/average ratio &amp;gt; 3), sizing is done for the peak and average utilisation falls; the sensitivity analysis in §5 quantifies the effect.&lt;/p>
&lt;/blockquote>
&lt;h3 id="12-step-2--set-the-slo-and-derive-the-maximum-utilisation">1.2 Step 2 — Set the SLO and derive the maximum utilisation&lt;/h3>
&lt;p>The latency SLO imposes a ceiling on GPU utilisation. Using queueing theory (M/G/1 model):&lt;/p>
$$\rho_{\max} \approx 1 - \frac{1}{\sqrt{1 + C_{s}^{2}}} \cdot \frac{W_{\text{queue}}^{*}}{\bar{s}}$$
&lt;p>where \(\rho\) is the utilisation, \(W_{\text{queue}}^{*}\) the maximum admissible queueing time and \(\bar{s}\) the average service time per request. For the simplified M/M/1 case with prefill time dominant:&lt;/p>
$$\rho_{\max} = 1 - \frac{W_{\text{queue}}^{*}}{\bar{s} \cdot (1 + W_{\text{queue}}^{*}/\bar{s})}$$
&lt;p>The practical reference table (derived from the Spheron/Little&amp;rsquo;s Law formula, 2026):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>SLO TTFT P99&lt;/th>
&lt;th>Maximum utilisation \(\rho_{\max}\)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>200 ms&lt;/td>
&lt;td>55 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>300 ms&lt;/td>
&lt;td>63 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>400 ms&lt;/td>
&lt;td>70 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>500 ms&lt;/td>
&lt;td>75 %&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>For our example (SLO 300 ms P99): \(\rho_{\max} = 0.63\).&lt;/p>
&lt;p>The ITL SLO imposes an additional constraint: the inference engine must be able to generate the next token in ≤ 50 ms. On H100 SXM5 with vLLM and Llama-3.3 70B FP8, the ITL P50 at 50 concurrent requests is ~20 ms, with P99 ~45 ms. ITL is the dominant constraint only when the batch size is very high (&amp;gt;64 sequences) or VRAM is nearly full.&lt;/p>
&lt;h3 id="13-step-3--required-throughput-and-throughput-per-gpu">1.3 Step 3 — Required throughput and throughput per GPU&lt;/h3>
&lt;p>The throughput the cluster must serve at peak, while respecting \(\rho_{\max}\):&lt;/p>
$$\dot{T}_{\text{required}} = \frac{\dot{T}_{\text{peak}}}{\rho_{\max}} = \frac{40{,}000}{0.63} \approx 63{,}500\;\text{tok/s (installed capacity)}$$
&lt;p>The &lt;strong>throughput per GPU&lt;/strong> (reference benchmark, vLLM v0.18.0, Llama-3.3 70B FP8, H100 SXM5 80 GB, 50 concurrent requests):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Engine&lt;/th>
&lt;th>Throughput (tok/s per GPU)&lt;/th>
&lt;th>TTFT P50 / P95 (50 req)&lt;/th>
&lt;th>Source&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>vLLM 0.18.0&lt;/td>
&lt;td>1,850&lt;/td>
&lt;td>380 ms / 720 ms&lt;/td>
&lt;td>Spheron benchmarks, Mar. 2026&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>SGLang 0.5.9&lt;/td>
&lt;td>1,920&lt;/td>
&lt;td>360 ms / 680 ms&lt;/td>
&lt;td>Spheron benchmarks, Mar. 2026&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>TensorRT-LLM 1.2.0&lt;/td>
&lt;td>2,100&lt;/td>
&lt;td>340 ms / 620 ms&lt;/td>
&lt;td>Spheron benchmarks, Mar. 2026&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>The throughput data correspond to the test with Llama 3.3 70B Instruct FP8, 512 input / 256 output tokens, 50 concurrent requests, on bare-metal H100 SXM5. See the engine analysis in &lt;a href="https://blog.lo0.es/en/posts/llm-serving-engines-pareto-frontier-comparison/">serving engines Pareto comparison&lt;/a>.&lt;/p>
&lt;/blockquote>
&lt;p>We use vLLM as the general-purpose production reference: \(\dot{T}_{\text{GPU}} = 1{,}850\) tok/s.&lt;/p>
&lt;h3 id="14-step-4--number-of-gpus-and-number-of-nodes">1.4 Step 4 — Number of GPUs and number of nodes&lt;/h3>
$$N_{\text{GPU}} = \left\lceil \frac{\dot{T}_{\text{required}}}{\dot{T}_{\text{GPU}}} \right\rceil = \left\lceil \frac{63{,}500}{1{,}850} \right\rceil = \lceil 34.3 \rceil = 35\;\text{GPUs}$$
&lt;p>With 4×H100 SXM5 nodes:&lt;/p>
$$N_{\text{nodes}} = \left\lceil \frac{N_{\text{GPU}}}{4} \right\rceil = \left\lceil \frac{35}{4} \right\rceil = 9\;\text{nodes}$$
&lt;p>We add &lt;strong>15 % headroom&lt;/strong> for hardware failures (~5 % annual rate in small clusters), upgrades and unforeseen peaks:&lt;/p>
$$N_{\text{nodes, final}} = \lceil 9 \times 1.15 \rceil = 11\;\text{nodes} \approx 44\;\text{GPUs}$$
&lt;blockquote>
&lt;p>For the TL;DR example (5M requests/day with a 16 h active profile, k 1.8 and an SLO of 300 ms) the number of nodes is 11. The simplified TL;DR case with k=1 and H=24 gives 3 nodes; the difference illustrates the impact of the hourly profile.&lt;/p>
&lt;/blockquote>
&lt;h3 id="15-summary-of-the-chain">1.5 Summary of the chain&lt;/h3>
&lt;div class="diagram" style="max-width:700px;margin:1rem auto;">
&lt;svg viewBox="0 0 700 110" role="img" aria-label="Sizing chain: demand and SLO derive the peak throughput, which divided by the throughput per GPU gives the number of GPUs and of nodes" xmlns="http://www.w3.org/2000/svg">
&lt;style>.bx{fill:none;stroke:currentColor;stroke-width:1.2}.ts{font:11px sans-serif;fill:currentColor}.arr{fill:none;stroke:currentColor;stroke-width:1.2;marker-end:url(#a)}&lt;/style>
&lt;defs>
&lt;marker id="a" markerWidth="6" markerHeight="6" refX="5" refY="3" orient="auto">
&lt;path d="M0,0 L6,3 L0,6 Z" fill="currentColor"/>
&lt;/marker>
&lt;/defs>
&lt;rect class="bx" x="10" y="30" width="110" height="50" rx="4"/>
&lt;text x="65" y="52" class="ts" text-anchor="middle">Demand&lt;/text>
&lt;text x="65" y="66" class="ts" text-anchor="middle">D, L, k, H&lt;/text>
&lt;line class="arr" x1="120" y1="55" x2="155" y2="55"/>
&lt;rect class="bx" x="155" y="30" width="110" height="50" rx="4"/>
&lt;text x="210" y="52" class="ts" text-anchor="middle">SLO&lt;/text>
&lt;text x="210" y="66" class="ts" text-anchor="middle">TTFT/ITL P99 → ρ&lt;/text>
&lt;line class="arr" x1="265" y1="55" x2="300" y2="55"/>
&lt;rect class="bx" x="300" y="30" width="110" height="50" rx="4"/>
&lt;text x="355" y="52" class="ts" text-anchor="middle">Required&lt;/text>
&lt;text x="355" y="66" class="ts" text-anchor="middle">throughput&lt;/text>
&lt;line class="arr" x1="410" y1="55" x2="445" y2="55"/>
&lt;rect class="bx" x="445" y="30" width="110" height="50" rx="4"/>
&lt;text x="500" y="52" class="ts" text-anchor="middle">N GPUs /&lt;/text>
&lt;text x="500" y="66" class="ts" text-anchor="middle">N nodes&lt;/text>
&lt;line class="arr" x1="555" y1="55" x2="590" y2="55"/>
&lt;rect class="bx" x="590" y="30" width="100" height="50" rx="4"/>
&lt;text x="640" y="52" class="ts" text-anchor="middle">TCO →&lt;/text>
&lt;text x="640" y="66" class="ts" text-anchor="middle">€/1M tok&lt;/text>
&lt;/svg>
&lt;/div>
&lt;hr>
&lt;h2 id="2-from-sizing-to-cost-the-tco-model">2. From sizing to cost: the TCO model&lt;/h2>
&lt;p>With \(N_{\text{nodes}} = 11\) 4×H100 SXM5 nodes, the TCO follows the model detailed in &lt;a href="https://blog.lo0.es/en/posts/full-tco-on-premise-gpu-cluster-capex-gpu-hour-break-even/">TCO of an on-premise GPU cluster&lt;/a>. Here the compact formula is reproduced and applied to the sized cluster.&lt;/p>
&lt;h3 id="21-annual-cost-per-node-base-scenario">2.1 Annual cost per node (base scenario)&lt;/h3>
$$C_{\text{node/year}} = \frac{\text{node capex}}{\text{years}} + \text{node opex/year}$$
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Line item&lt;/th>
&lt;th>Value (USD / €)&lt;/th>
&lt;th>Note&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>4×H100 node capex (midpoint)&lt;/td>
&lt;td>178,500 USD&lt;/td>
&lt;td>GPUs + server + network + storage + rack&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3-year amortisation&lt;/td>
&lt;td>59,500 USD/year ≈ 55,300 €/year&lt;/td>
&lt;td>Straight line&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Opex/year (base scenario, 8–16 node cluster)&lt;/td>
&lt;td>~28,000 €/year&lt;/td>
&lt;td>Energy + staff + maintenance + colocation&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Total per node per year&lt;/strong>&lt;/td>
&lt;td>&lt;strong>~83,300 €/year&lt;/strong>&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>For 11 nodes: &lt;strong>915,300 €/year&lt;/strong> of total fixed cost.&lt;/p>
&lt;h3 id="22-from-node-year-to-gpu-hour">2.2 From €/node-year to €/GPU-hour&lt;/h3>
$$\text{EUR/GPU-hour} = \frac{C_{\text{node/year}}}{4\;\text{GPUs} \times 8{,}760\;\text{h} \times \rho}$$
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Utilisation \(\rho\)&lt;/th>
&lt;th>EUR/GPU-hour&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>40 %&lt;/td>
&lt;td>5.93&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>55 %&lt;/td>
&lt;td>4.31&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>63 % (SLO 300 ms)&lt;/td>
&lt;td>3.76&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>70 %&lt;/td>
&lt;td>3.39&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>80 %&lt;/td>
&lt;td>2.97&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>100 %&lt;/td>
&lt;td>2.38&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="23-from-gpu-hour-to-1m-tokens">2.3 From €/GPU-hour to €/1M tokens&lt;/h3>
$$\text{EUR/1M tokens} = \frac{\text{EUR/GPU-hour} \times 10^{6}}{\dot{T}_{\text{GPU}} \times 3{,}600}$$
&lt;p>With \(\dot{T}_{\text{GPU}} = 1{,}850\) tok/s (vLLM, Llama-3.3 70B FP8):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Utilisation&lt;/th>
&lt;th>EUR/GPU-hour&lt;/th>
&lt;th>EUR/1M tokens&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>40 %&lt;/td>
&lt;td>5.93&lt;/td>
&lt;td>&lt;strong>0.891&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>55 %&lt;/td>
&lt;td>4.31&lt;/td>
&lt;td>&lt;strong>0.647&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>63 % (SLO 300 ms)&lt;/td>
&lt;td>3.76&lt;/td>
&lt;td>&lt;strong>0.564&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>70 %&lt;/td>
&lt;td>3.39&lt;/td>
&lt;td>&lt;strong>0.509&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>80 %&lt;/td>
&lt;td>2.97&lt;/td>
&lt;td>&lt;strong>0.446&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>100 %&lt;/td>
&lt;td>2.38&lt;/td>
&lt;td>&lt;strong>0.357&lt;/strong>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>The complete cost/token identity as a function of throughput and utilisation is developed in &lt;a href="https://blog.lo0.es/en/posts/gpu-hour-to-cost-per-token-on-prem-vs-cloud/">cost per token and per request&lt;/a>.&lt;/p>
&lt;/blockquote>
&lt;h3 id="24-comparison-with-cloud-equivalent-1m-tokens">2.4 Comparison with cloud (equivalent €/1M tokens)&lt;/h3>
&lt;p>To compare, the cloud price is converted to the €/1M tokens equivalent using the same reference throughput (\(\dot{T}_{\text{GPU}} = 1{,}850\) tok/s):&lt;/p>
$$\text{EUR/1M tokens (cloud)} = \frac{P_{\text{cloud}} \times 10^{6}}{1{,}850 \times 3{,}600}$$
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Provider / Mode&lt;/th>
&lt;th>GPU-hour price (USD)&lt;/th>
&lt;th>EUR/GPU-hour (\(1\,\text{USD} \approx 0.93\,\text{EUR}\))&lt;/th>
&lt;th>EUR/1M tokens equiv.&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>AWS p5 on-demand (post Jun. 2025)&lt;/td>
&lt;td>3.90&lt;/td>
&lt;td>3.63&lt;/td>
&lt;td>&lt;strong>0.545&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>AWS p5 1-year reserved&lt;/td>
&lt;td>~2.50&lt;/td>
&lt;td>2.33&lt;/td>
&lt;td>&lt;strong>0.350&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>CoreWeave on-demand&lt;/td>
&lt;td>~2.01&lt;/td>
&lt;td>1.87&lt;/td>
&lt;td>&lt;strong>0.281&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>CoreWeave 3-year reserved&lt;/td>
&lt;td>~1.49&lt;/td>
&lt;td>1.39&lt;/td>
&lt;td>&lt;strong>0.209&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>GCP A3 on-demand&lt;/td>
&lt;td>~3.67&lt;/td>
&lt;td>3.41&lt;/td>
&lt;td>&lt;strong>0.512&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Azure ND H100 v5 on-demand&lt;/td>
&lt;td>~6.98&lt;/td>
&lt;td>6.49&lt;/td>
&lt;td>&lt;strong>0.975&lt;/strong>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Sources: IntuitionLabs (Jun. 2026), CloudZero (Jun. 2026), Spheron GPU pricing (May 2026).&lt;/p>
&lt;hr>
&lt;h2 id="3-break-even-and-payback-of-your-own-investment">3. Break-even and payback of your own investment&lt;/h2>
&lt;h3 id="31-the-utilisation-break-even-formula">3.1 The utilisation break-even formula&lt;/h3>
&lt;p>The utilisation break-even \(u^{*}\) is the utilisation at which the annual on-prem cost per GPU-hour equals the cloud price:&lt;/p>
$$u^{*} = \frac{\text{capex/year} + \text{opex/year}}{4 \times 8{,}760 \times P_{\text{cloud}}}$$
&lt;p>where \(P_{\text{cloud}}\) is the cloud price in the same currency as the on-prem costs.&lt;/p>
&lt;p>With the base scenario (capex/year 55,300 €, opex/year 28,000 €, total 83,300 €/node/year):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Cloud reference&lt;/th>
&lt;th>Cloud price (EUR/GPU-hour)&lt;/th>
&lt;th>\(u^{*}\) break-even&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Azure on-demand (~6.49 EUR)&lt;/td>
&lt;td>6.49&lt;/td>
&lt;td>&lt;strong>23 %&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>AWS on-demand post-cut (~3.63 EUR)&lt;/td>
&lt;td>3.63&lt;/td>
&lt;td>&lt;strong>41 %&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>GCP on-demand (~3.41 EUR)&lt;/td>
&lt;td>3.41&lt;/td>
&lt;td>&lt;strong>44 %&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>CoreWeave on-demand (~1.87 EUR)&lt;/td>
&lt;td>1.87&lt;/td>
&lt;td>&lt;strong>80 %&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>CoreWeave 3-yr reserved (~1.39 EUR)&lt;/td>
&lt;td>1.39&lt;/td>
&lt;td>&lt;strong>&amp;gt;100 %&lt;/strong> (impossible)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>AWS 1-yr reserved (~2.33 EUR)&lt;/td>
&lt;td>2.33&lt;/td>
&lt;td>&lt;strong>64 %&lt;/strong>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;div class="diagram" style="max-width:720px;margin:1rem auto;">
&lt;svg viewBox="0 0 720 240" role="img" aria-label="Break-even on-prem vs cloud: the on-prem curve falls with utilisation and crosses AWS on-demand at 41 per cent, GCP at 44 per cent and CoreWeave on-demand at 80 per cent" xmlns="http://www.w3.org/2000/svg">
&lt;style>.ax{fill:none;stroke:currentColor;stroke-width:1}.cv{fill:none;stroke:currentColor;stroke-width:1.8}.dsh{fill:none;stroke:currentColor;stroke-width:1.2;stroke-dasharray:5 3}.ts{font:11px sans-serif;fill:currentColor}.tl{font:600 11px sans-serif;fill:currentColor}&lt;/style>
&lt;line class="ax" x1="60" y1="20" x2="60" y2="200"/>
&lt;line class="ax" x1="60" y1="200" x2="700" y2="200"/>
&lt;text x="20" y="120" class="ts" transform="rotate(-90 20 120)">EUR/GPU-h&lt;/text>
&lt;text x="340" y="222" class="ts">utilisation →&lt;/text>
&lt;text x="62" y="216" class="ts">0&lt;/text>
&lt;text x="190" y="216" class="ts">30&lt;/text>
&lt;text x="330" y="216" class="ts">60&lt;/text>
&lt;text x="460" y="216" class="ts">80&lt;/text>
&lt;text x="600" y="216" class="ts">100 %&lt;/text>
&lt;line class="ax" x1="200" y1="197" x2="200" y2="203"/>
&lt;line class="ax" x1="340" y1="197" x2="340" y2="203"/>
&lt;line class="ax" x1="460" y1="197" x2="460" y2="203"/>
&lt;line class="ax" x1="600" y1="197" x2="600" y2="203"/>
&lt;path class="cv" d="M75,30 C120,55 200,100 300,140 C400,165 520,180 670,190"/>
&lt;text x="76" y="26" class="tl">on-prem (fixed capex)&lt;/text>
&lt;line class="cv" x1="60" y1="130" x2="700" y2="130"/>
&lt;text x="590" y="125" class="ts">Azure OD (6.49 €)&lt;/text>
&lt;line class="cv" x1="60" y1="160" x2="700" y2="160"/>
&lt;text x="590" y="155" class="ts">AWS OD (3.63 €)&lt;/text>
&lt;line class="cv" x1="60" y1="167" x2="700" y2="167"/>
&lt;text x="590" y="178" class="ts">GCP OD (3.41 €)&lt;/text>
&lt;line class="cv" x1="60" y1="185" x2="700" y2="185"/>
&lt;text x="576" y="181" class="ts">CoreWeave OD (1.87 €)&lt;/text>
&lt;line class="dsh" x1="240" y1="20" x2="240" y2="200"/>
&lt;text x="210" y="38" class="tl">41 % (AWS)&lt;/text>
&lt;line class="dsh" x1="258" y1="20" x2="258" y2="200"/>
&lt;text x="255" y="52" class="ts">44 % (GCP)&lt;/text>
&lt;line class="dsh" x1="475" y1="20" x2="475" y2="200"/>
&lt;text x="448" y="38" class="ts">80 % (CoreWeave OD)&lt;/text>
&lt;/svg>
&lt;/div>
&lt;h3 id="32-capex-payback">3.2 Capex payback&lt;/h3>
&lt;p>Payback is the time \(T_{\text{pay}}\) in which the cumulative saving against cloud equals the initial capex:&lt;/p>
$$T_{\text{pay}} = \frac{\text{total cluster capex}}{(\text{cloud cost/year}) - (\text{on-prem opex/year})}$$
&lt;p>where the cloud cost/year is computed at the same sustained utilisation.&lt;/p>
&lt;p>For the 11-node cluster (total capex 11 × 178,500 USD ≈ 1,825,000 USD ≈ 1,697,000 €):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Cloud reference&lt;/th>
&lt;th>Sustained utilisation&lt;/th>
&lt;th>Annual saving vs cloud&lt;/th>
&lt;th>Payback&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>AWS on-demand (3.63 EUR/h)&lt;/td>
&lt;td>70 %&lt;/td>
&lt;td>(3.63 − 3.39 EUR) × 4 × 8760 × 0.70 × 11 nodes ≈ &lt;strong>63,900 €/year&lt;/strong>&lt;/td>
&lt;td>~27 months&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>AWS on-demand (3.63 EUR/h)&lt;/td>
&lt;td>80 %&lt;/td>
&lt;td>(3.63 − 2.97) × 4 × 8760 × 0.80 × 11 ≈ &lt;strong>203,600 €/year&lt;/strong>&lt;/td>
&lt;td>~10 months&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>GCP on-demand (3.41 EUR/h)&lt;/td>
&lt;td>70 %&lt;/td>
&lt;td>(3.41 − 3.39) × 4 × 8760 × 0.70 × 11 ≈ &lt;strong>5,400 €/year&lt;/strong>&lt;/td>
&lt;td>~315 months (not viable)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Azure on-demand (6.49 EUR/h)&lt;/td>
&lt;td>70 %&lt;/td>
&lt;td>(6.49 − 3.39) × 4 × 8760 × 0.70 × 11 ≈ &lt;strong>830,000 €/year&lt;/strong>&lt;/td>
&lt;td>~2 months&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>The 13-month payback quoted in studies such as Lenovo TCO 2026 corresponds to ~80 % utilisation against high-priced hyperscalers (Azure/AWS before the cut). With current prices (post June 2025, AWS at 3.90 USD), the window widens.&lt;/p>
&lt;/blockquote>
&lt;h3 id="33-simple-payback-capex-only-vs-equivalent-cloud">3.3 Simple payback (capex only vs equivalent cloud)&lt;/h3>
&lt;p>If on-prem opex is omitted and only capex is compared with the gross saving:&lt;/p>
$$T_{\text{pay,simple}} = \frac{\text{capex}}{P_{\text{cloud}} \times 4 \times 8{,}760 \times \rho \times N_{\text{nodes}}}$$
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Utilisation&lt;/th>
&lt;th>AWS (3.63 EUR)&lt;/th>
&lt;th>Azure (6.49 EUR)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>50 %&lt;/td>
&lt;td>54 months&lt;/td>
&lt;td>30 months&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>70 %&lt;/td>
&lt;td>39 months&lt;/td>
&lt;td>22 months&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>80 %&lt;/td>
&lt;td>34 months&lt;/td>
&lt;td>19 months&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h2 id="4-decision-table-when-to-buy-rent-or-go-hybrid">4. Decision table: when to buy, rent or go hybrid&lt;/h2>
&lt;p>The table below is a five-dimension Pareto. There is no implicit order between columns; the reading depends on the organisation&amp;rsquo;s constraints.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Option&lt;/th>
&lt;th>EUR/GPU-hour (util. 70 %)&lt;/th>
&lt;th>Initial capex&lt;/th>
&lt;th>Required utilisation&lt;/th>
&lt;th>Data sovereignty&lt;/th>
&lt;th>Peak elasticity&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>On-prem purchase, util. ≥ 70 %&lt;/strong>&lt;/td>
&lt;td>3.39&lt;/td>
&lt;td>high (178k USD/node)&lt;/td>
&lt;td>≥ 70 % sustained&lt;/td>
&lt;td>total&lt;/td>
&lt;td>none&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>On-prem purchase, util. &amp;lt; 50 %&lt;/strong>&lt;/td>
&lt;td>&amp;gt; 4.75&lt;/td>
&lt;td>high&lt;/td>
&lt;td>&amp;lt; 50 % → loses vs cloud&lt;/td>
&lt;td>total&lt;/td>
&lt;td>none&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Sovereign EU cloud OD (Scaleway/Nebius EU)&lt;/strong>&lt;/td>
&lt;td>2.00–3.59&lt;/td>
&lt;td>none&lt;/td>
&lt;td>any&lt;/td>
&lt;td>yes (EU)&lt;/td>
&lt;td>total&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>AWS p5 on-demand (post Jun. 2025)&lt;/strong>&lt;/td>
&lt;td>3.63&lt;/td>
&lt;td>none&lt;/td>
&lt;td>any&lt;/td>
&lt;td>no (CLOUD Act)&lt;/td>
&lt;td>total&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>CoreWeave on-demand&lt;/strong>&lt;/td>
&lt;td>1.87&lt;/td>
&lt;td>none&lt;/td>
&lt;td>any&lt;/td>
&lt;td>partial (US)&lt;/td>
&lt;td>total&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>CoreWeave 3-year reserved&lt;/strong>&lt;/td>
&lt;td>1.29–1.39&lt;/td>
&lt;td>financial commitment&lt;/td>
&lt;td>rigid contract&lt;/td>
&lt;td>partial (US)&lt;/td>
&lt;td>none&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>AWS 1-year reserved&lt;/strong>&lt;/td>
&lt;td>~2.17&lt;/td>
&lt;td>1-year commitment&lt;/td>
&lt;td>contract&lt;/td>
&lt;td>no (CLOUD Act)&lt;/td>
&lt;td>none&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Hybrid on-prem base + EU cloud peak&lt;/strong>&lt;/td>
&lt;td>2.50–3.39 (weighted)&lt;/td>
&lt;td>medium&lt;/td>
&lt;td>base ≥ 70 %, elastic peak&lt;/td>
&lt;td>yes (EU)&lt;/td>
&lt;td>elastic peak&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Cut-off criteria that come before the table:&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>&lt;strong>GDPR sovereignty&lt;/strong>: if the data is personal or the system is high-risk under the EU AI Act, CoreWeave/AWS are ruled out before any price comparison.&lt;/li>
&lt;li>&lt;strong>Minimum volume to amortise capex&lt;/strong>: below ~2M tokens/day sustained over 3 years, on-prem capex does not amortise against AWS on-demand.&lt;/li>
&lt;li>&lt;strong>Traffic elasticity&lt;/strong>: peaks &amp;gt;3× the base favour a hybrid or pure cloud; a stable base favours on-prem.&lt;/li>
&lt;/ol>
&lt;p>The cost/sovereignty Pareto frontier for GDPR data leaves three options: on-prem, sovereign EU cloud and hybrid. Sustained utilisation and traffic predictability decide between them. See the cross-analysis of the four axes in &lt;a href="https://blog.lo0.es/en/posts/sovereign-on-premise-vs-hyperscalers-data/">sovereign on-premise vs hyperscalers&lt;/a>.&lt;/p>
&lt;hr>
&lt;h2 id="5-sensitivity-analysis">5. Sensitivity analysis&lt;/h2>
&lt;h3 id="51-sizing-vs-hourly-profile-and-peak-factor">5.1 Sizing vs hourly profile and peak factor&lt;/h3>
&lt;p>The number of GPUs grows linearly with \(k_{\text{peak}}\) and inversely with \(\rho_{\max}\):&lt;/p>
$$N_{\text{GPU}} = \left\lceil \frac{D \times L_{\text{out}} \times k_{\text{peak}}}{H \times 3{,}600 \times \rho_{\max} \times \dot{T}_{\text{GPU}}} \right\rceil$$
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Peak factor \(k\)&lt;/th>
&lt;th>SLO 300 ms (\(\rho_{\max}=0.63\))&lt;/th>
&lt;th>SLO 500 ms (\(\rho_{\max}=0.75\))&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1.2&lt;/td>
&lt;td>8 GPUs (2 nodes)&lt;/td>
&lt;td>6 GPUs (2 nodes)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>1.8&lt;/td>
&lt;td>12 GPUs (3 nodes)&lt;/td>
&lt;td>10 GPUs (3 nodes)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2.5&lt;/td>
&lt;td>16 GPUs (4 nodes)&lt;/td>
&lt;td>13 GPUs (4 nodes)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3.5&lt;/td>
&lt;td>22 GPUs (6 nodes)&lt;/td>
&lt;td>18 GPUs (5 nodes)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>(Example simplified to 5M req/day with H=24 to illustrate the sensitivity to the peak factor)&lt;/p>
&lt;/blockquote>
&lt;p>A peak factor of 3.5× triples the number of nodes compared with k=1.2 at the same SLO. Sizing hardware for \(k > 2.5\) leaves GPUs idle more than 70 % of the time; peak cloud is more efficient beyond that threshold.&lt;/p>
&lt;h3 id="52-break-even-vs-sustained-utilisation">5.2 Break-even vs sustained utilisation&lt;/h3>
$$u^{*} = \frac{83{,}300}{4 \times 8{,}760 \times P_{\text{cloud}}}$$
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Cloud price (EUR/GPU-hour)&lt;/th>
&lt;th>\(u^{*}\) break-even&lt;/th>
&lt;th>Scenario&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>6.49 (Azure OD)&lt;/td>
&lt;td>23 %&lt;/td>
&lt;td>On-prem wins almost always&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3.63 (AWS OD)&lt;/td>
&lt;td>41 %&lt;/td>
&lt;td>On-prem wins if util. &amp;gt; 41 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3.41 (GCP OD)&lt;/td>
&lt;td>44 %&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2.33 (AWS 1-yr reserved)&lt;/td>
&lt;td>64 %&lt;/td>
&lt;td>On-prem wins if util. &amp;gt; 64 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>1.87 (CoreWeave OD)&lt;/td>
&lt;td>80 %&lt;/td>
&lt;td>Hard to reach in production&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>1.39 (CoreWeave 3-yr reserved)&lt;/td>
&lt;td>&amp;gt;100 %&lt;/td>
&lt;td>On-prem never closes the gap&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="53-break-even-vs-energy-price">5.3 Break-even vs energy price&lt;/h3>
&lt;p>Energy accounts for 6–11 % of total TCO. Its impact on the break-even is moderate:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Energy price (EUR/kWh)&lt;/th>
&lt;th>Energy opex/year per node&lt;/th>
&lt;th>EUR/GPU-hour (70 % util.)&lt;/th>
&lt;th>\(u^{*}\) vs AWS OD&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>0.034 (solar PPA)&lt;/td>
&lt;td>1,604 €&lt;/td>
&lt;td>3.22&lt;/td>
&lt;td>38 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>0.116 (industrial ES, base)&lt;/td>
&lt;td>5,475 €&lt;/td>
&lt;td>3.39&lt;/td>
&lt;td>41 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>0.200 (high tariff)&lt;/td>
&lt;td>9,437 €&lt;/td>
&lt;td>3.57&lt;/td>
&lt;td>43 %&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The difference between the cheapest and the most expensive scenario is only 5 percentage points of break-even. The variable that moves the needle is utilisation, not energy.&lt;/p>
&lt;h3 id="54-break-even-vs-demand-growth">5.4 Break-even vs demand growth&lt;/h3>
&lt;p>If demand grows at an annual rate \(g\), the average utilisation of the cluster (sized for year 1) rises over time until it saturates and has to be expanded:&lt;/p>
$$\rho(t) = \rho_{0} \times (1 + g)^{t}$$
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Annual growth \(g\)&lt;/th>
&lt;th>Time to saturation (\(\rho \to 100\,\%\))&lt;/th>
&lt;th>Decision&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>10 %&lt;/td>
&lt;td>~11 years&lt;/td>
&lt;td>Comfortable purchase&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>30 %&lt;/td>
&lt;td>~4 years&lt;/td>
&lt;td>Purchase with a review at 3 years&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>60 %&lt;/td>
&lt;td>~2 years&lt;/td>
&lt;td>Hybrid: base + elastic cloud&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&amp;gt;100 %&lt;/td>
&lt;td>&amp;lt;1 year&lt;/td>
&lt;td>Pure cloud until it stabilises&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>For growth above 30 % per year, a buy-only strategy means oversizing for the future peak or re-buying hardware in short cycles. The hybrid (on-prem base + cloud for growth) minimises the capex at risk.&lt;/p>
&lt;h3 id="55-headroom-the-cost-of-the-safety-margin">5.5 Headroom: the cost of the safety margin&lt;/h3>
&lt;p>The 15 % headroom in \(N_{\text{nodes}}\) amounts to having ~1.6 extra nodes on average. Its annual cost is:&lt;/p>
$$C_{\text{headroom}} = 0.15 \times 83{,}300\;\text{EUR/node/year} \times N_{\text{nodes,base}} \approx 12{,}500 \times 9 = 112{,}500\;\text{EUR/year}$$
&lt;p>That cost is justified by:&lt;/p>
&lt;ul>
&lt;li>GPU failure rate ~5 % per year (in small clusters, documented by Introl, Apr. 2026)&lt;/li>
&lt;li>Replacement time of 2–8 weeks (depending on market availability)&lt;/li>
&lt;li>Unforeseen peaks of up to 20 % above the estimate&lt;/li>
&lt;/ul>
&lt;p>If the service can degrade gracefully (relaxing the TTFT SLO from 300 ms to 500 ms at extreme peak), headroom can be cut to 10 %, saving ~37,500 EUR/year.&lt;/p>
&lt;hr>
&lt;h2 id="6-sensitivity-map-gpu-hour-and-break-even-on-two-axes">6. Sensitivity map: €/GPU-hour and break-even on two axes&lt;/h2>
&lt;p>The table below crosses utilisation with the opex scenario, showing the all-in EUR/GPU-hour (base scenario, capex/year 55,300 €):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>Low opex (13,000 €/year)&lt;/th>
&lt;th>Base opex (28,000 €/year)&lt;/th>
&lt;th>High opex (75,000 €/year)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Util. 40 %&lt;/strong>&lt;/td>
&lt;td>4.74&lt;/td>
&lt;td>5.93&lt;/td>
&lt;td>9.06&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Util. 55 %&lt;/strong>&lt;/td>
&lt;td>3.45&lt;/td>
&lt;td>4.31&lt;/td>
&lt;td>6.59&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Util. 63 %&lt;/strong>&lt;/td>
&lt;td>3.01&lt;/td>
&lt;td>3.76&lt;/td>
&lt;td>5.75&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Util. 70 %&lt;/strong>&lt;/td>
&lt;td>2.71&lt;/td>
&lt;td>3.39&lt;/td>
&lt;td>5.18&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Util. 80 %&lt;/strong>&lt;/td>
&lt;td>2.37&lt;/td>
&lt;td>2.97&lt;/td>
&lt;td>4.54&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Util. 100 %&lt;/strong>&lt;/td>
&lt;td>1.90&lt;/td>
&lt;td>2.38&lt;/td>
&lt;td>3.63&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The crossing point with the cloud price (AWS OD: 3.63 EUR):&lt;/p>
&lt;ul>
&lt;li>Low-opex scenario: break-even at ~&lt;strong>38 % utilisation&lt;/strong>&lt;/li>
&lt;li>Base-opex scenario: break-even at ~&lt;strong>41 % utilisation&lt;/strong>&lt;/li>
&lt;li>High-opex scenario: break-even at ~&lt;strong>53 % utilisation&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>The biggest lever for lowering the break-even is not hardware capex but opex (staff and colocation above all). See the analysis of utilisation as a FinOps lever in &lt;a href="https://blog.lo0.es/en/posts/gpu-idle-cost-not-on-any-invoice/">GPU utilisation as FinOps&lt;/a>.&lt;/p>
&lt;hr>
&lt;h2 id="7-integration-with-the-rest-of-the-finops-chain">7. Integration with the rest of the FinOps chain&lt;/h2>
&lt;p>The sizing of §1 determines the number of nodes; the TCO of §2 gives the cost per hour; the comparison of §3 gives the break-even. Those three numbers feed directly into the other instruments of the series:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Instrument&lt;/th>
&lt;th>Input from this article&lt;/th>
&lt;th>Output&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;a href="https://blog.lo0.es/en/posts/guidellm-validating-slo-under-load-sizing-knee/">GuideLLM — SLO validation under load&lt;/a>&lt;/td>
&lt;td>TTFT/ITL P99 SLO from step 2&lt;/td>
&lt;td>Experimental confirmation of the real throughput per GPU&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">Capacity planning for on-premise inference&lt;/a>&lt;/td>
&lt;td>Demand profile and N GPUs from step 4&lt;/td>
&lt;td>Scaling policy and autoscaling triggers&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://blog.lo0.es/en/posts/gpu-hour-to-cost-per-token-on-prem-vs-cloud/">Cost per token and per request&lt;/a>&lt;/td>
&lt;td>EUR/GPU-hour from step §2.2&lt;/td>
&lt;td>EUR/1M tokens per model and batching&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://blog.lo0.es/en/posts/cloud-gpu-on-demand-reserved-spot-neoclouds-2026-prices/">Cloud GPU commitment and spot&lt;/a>&lt;/td>
&lt;td>Cloud prices from table §2.4&lt;/td>
&lt;td>Optimisation of the complementary cloud tier&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://blog.lo0.es/en/posts/sovereign-on-premise-vs-hyperscalers-data/">Sovereign on-premise vs hyperscalers&lt;/a>&lt;/td>
&lt;td>Break-even from §3&lt;/td>
&lt;td>Final buy/rent decision including the sovereignty axis&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://blog.lo0.es/en/posts/full-tco-on-premise-gpu-cluster-capex-gpu-hour-break-even/">TCO of an on-premise GPU cluster&lt;/a>&lt;/td>
&lt;td>Capex and opex from §2.1&lt;/td>
&lt;td>Detailed TCO model with every line item&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://blog.lo0.es/en/posts/gpu-idle-cost-not-on-any-invoice/">GPU utilisation as FinOps&lt;/a>&lt;/td>
&lt;td>Target utilisation from step 2&lt;/td>
&lt;td>Scheduling levers to raise real utilisation&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h2 id="sources">Sources&lt;/h2>
&lt;ul>
&lt;li>Spheron · LLM Inference SLO Engineering: TTFT, ITL, and P99 Latency Budgets for Production AI (2026) — &lt;a href="https://www.spheron.network/blog/llm-inference-slo-ttft-itl-latency-budget-guide-2026/">https://www.spheron.network/blog/llm-inference-slo-ttft-itl-latency-budget-guide-2026/&lt;/a>&lt;/li>
&lt;li>Spheron · vLLM vs TensorRT-LLM vs SGLang: H100 Benchmarks (2026) — &lt;a href="https://www.spheron.network/blog/vllm-vs-tensorrt-llm-vs-sglang-benchmarks/">https://www.spheron.network/blog/vllm-vs-tensorrt-llm-vs-sglang-benchmarks/&lt;/a>&lt;/li>
&lt;li>Spheron · GPU Cloud Pricing 2026: H100 from 1.03 USD/hr, B200 from 2.12 USD/hr — &lt;a href="https://www.spheron.network/blog/gpu-cloud-pricing-comparison-2026/">https://www.spheron.network/blog/gpu-cloud-pricing-comparison-2026/&lt;/a>&lt;/li>
&lt;li>Spheron · LLM Inference On-Premise vs GPU Cloud: 2026 Cost and Break-Even Analysis — &lt;a href="https://www.spheron.network/blog/llm-inference-on-premise-vs-cloud/">https://www.spheron.network/blog/llm-inference-on-premise-vs-cloud/&lt;/a>&lt;/li>
&lt;li>MLPerf Inference v5.1 — Red Hat: 5 777 tok/s (offline) en Llama 3.1-8B FP8 en H100 — &lt;a href="https://www.redhat.com/en/blog/efficient-and-reproducible-llm-inference-red-hat-mlperf-inference-v51-results">https://www.redhat.com/en/blog/efficient-and-reproducible-llm-inference-red-hat-mlperf-inference-v51-results&lt;/a>&lt;/li>
&lt;li>MLPerf Inference v6.0 Results Explained: GPU Performance Rankings for AI Workloads (2026) — &lt;a href="https://www.spheron.network/blog/mlperf-inference-v6-benchmark-results-2026/">https://www.spheron.network/blog/mlperf-inference-v6-benchmark-results-2026/&lt;/a>&lt;/li>
&lt;li>IntuitionLabs · H100 Rental Prices Compared: 1.49–6.98 USD/hr Across 15+ Cloud Providers (2026) — &lt;a href="https://intuitionlabs.ai/articles/h100-rental-prices-cloud-comparison">https://intuitionlabs.ai/articles/h100-rental-prices-cloud-comparison&lt;/a>&lt;/li>
&lt;li>CloudZero · Cloud GPU Pricing Comparison: AWS vs Azure vs GCP For AI Workloads (2026) — &lt;a href="https://www.cloudzero.com/blog/cloud-gpu-pricing-comparison/">https://www.cloudzero.com/blog/cloud-gpu-pricing-comparison/&lt;/a>&lt;/li>
&lt;li>Lenovo Press · On-Premise vs Cloud: Generative AI Total Cost of Ownership (2026 Edition) — &lt;a href="https://lenovopress.lenovo.com/lp2368-on-premise-vs-cloud-generative-ai-total-cost-of-ownership-2026-edition">https://lenovopress.lenovo.com/lp2368-on-premise-vs-cloud-generative-ai-total-cost-of-ownership-2026-edition&lt;/a>&lt;/li>
&lt;li>Introl · GPU Infrastructure TCO Model: 5-Year Cost Analysis for Enterprise AI (abr. 2026) — &lt;a href="https://introl.com/blog/gpu-infrastructure-tco-5-year-cost-model">https://introl.com/blog/gpu-infrastructure-tco-5-year-cost-model&lt;/a>&lt;/li>
&lt;li>GMI Cloud · NVIDIA H100 GPU Pricing 2026: Rent vs Buy Cost Analysis — &lt;a href="https://www.gmicloud.ai/en/blog/nvidia-h100-gpu-pricing-2026-rent-vs-buy-cost-analysis">https://www.gmicloud.ai/en/blog/nvidia-h100-gpu-pricing-2026-rent-vs-buy-cost-analysis&lt;/a>&lt;/li>
&lt;li>Red Hat · 233 % 3-year ROI and 13 months to payback with Red Hat AI (feb. 2026) — &lt;a href="https://www.redhat.com/en/blog/233-3-year-return-investment-and-13-months-payback-red-hat-ai">https://www.redhat.com/en/blog/233-3-year-return-investment-and-13-months-payback-red-hat-ai&lt;/a>&lt;/li>
&lt;li>VentureBeat · 5 % GPU utilization: the 401 billion USD AI infrastructure problem — &lt;a href="https://venturebeat.com/infrastructure/5-gpu-utilization-the-401-billion-ai-infrastructure-problem-enterprises-cant-keep-ignoring/">https://venturebeat.com/infrastructure/5-gpu-utilization-the-401-billion-ai-infrastructure-problem-enterprises-cant-keep-ignoring/&lt;/a>&lt;/li>
&lt;li>DZone · Queueing Theory for LLM Inference — &lt;a href="https://dzone.com/articles/queueing-theory-for-llm-inference">https://dzone.com/articles/queueing-theory-for-llm-inference&lt;/a>&lt;/li>
&lt;li>GuideLLM · Evaluate LLM deployments for real-world inference (Red Hat Developer, jun. 2025) — &lt;a href="https://developers.redhat.com/articles/2025/06/20/guidellm-evaluate-llm-deployments-real-world-inference">https://developers.redhat.com/articles/2025/06/20/guidellm-evaluate-llm-deployments-real-world-inference&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>GuideLLM in depth: validating the SLO under load and sizing from the knee</title><link>https://blog.lo0.es/en/posts/guidellm-validating-slo-under-load-sizing-knee/</link><pubDate>Sun, 14 Jun 2026 04:30:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/guidellm-validating-slo-under-load-sizing-knee/</guid><description>&lt;blockquote>
&lt;p>Notation: amounts in &lt;strong>euros (N €)&lt;/strong>, decimals with a point. The dollar sign is not used
(on this site it is a formula delimiter).&lt;/p>
&lt;/blockquote>
&lt;h2 id="what-this-article-covers">What this article covers&lt;/h2>
&lt;p>Third article of the &lt;strong>benchmarking&lt;/strong> track (B3). B2 covered the tool catalogue; here we go into
&lt;strong>GuideLLM&lt;/strong> in depth, because it answers the operational question that sizes a platform: &lt;strong>how far
can I load this engine without breaking the SLO?&lt;/strong> It is not a catalogue benchmark (&amp;ldquo;X tokens/s&amp;rdquo;), it
is an &lt;strong>SLO-driven sweep&lt;/strong> that finds the &lt;strong>knee&lt;/strong>, the safe capacity, and from which the real replica
count and cost per token come out. We will look at its load modes, how the SLO is defined, how to read
the output and how to turn the knee into sizing and into euros. With real commands; no recommendations,
only the mechanics.&lt;/p>
&lt;hr>
&lt;h2 id="why-guidellm">Why GuideLLM&lt;/h2>
&lt;p>GuideLLM (a vLLM project) generates &lt;strong>realistic, configurable traffic patterns&lt;/strong> and captures &lt;strong>full
distributions&lt;/strong> of TTFT, ITL and end-to-end behaviour, for &lt;strong>SLO-driven&lt;/strong> evaluation, with reproducible
sweeps that identify the safe operating range
(&lt;a href="https://developers.redhat.com/articles/2025/06/20/guidellm-evaluate-llm-deployments-real-world-inference">Red Hat&lt;/a>).
Unlike a micro-benchmark, it &lt;strong>measures the engine, not the client&lt;/strong> (multi-process load generation), and
unlike MLPerf, it &lt;strong>sizes your specific case&lt;/strong> (your model, your SLO, your load). It is the middle tool:
not for tuning a flag, not for comparing vendors, but for &lt;strong>deciding how many GPUs you need&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="the-load-modes-rate-types">The load modes (rate-types)&lt;/h2>
&lt;p>GuideLLM offers several modes through &lt;code>--rate-type&lt;/code>, and picking the right one is half the work:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;code>--rate-type&lt;/code>&lt;/th>
&lt;th>What it does&lt;/th>
&lt;th>When&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>synchronous&lt;/strong>&lt;/td>
&lt;td>one request at a time&lt;/td>
&lt;td>baseline latency, no concurrency&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>concurrent&lt;/strong>&lt;/td>
&lt;td>keeps N fixed simultaneous requests&lt;/td>
&lt;td>measuring at a specific concurrency&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>poisson&lt;/strong>&lt;/td>
&lt;td>requests per second following Poisson&lt;/td>
&lt;td>simulating real traffic (random arrivals)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>throughput&lt;/strong>&lt;/td>
&lt;td>saturates the engine to the maximum&lt;/td>
&lt;td>raw peak capacity&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>sweep&lt;/strong>&lt;/td>
&lt;td>automatic ramp from idle to maximum&lt;/td>
&lt;td>&lt;strong>finding the knee&lt;/strong> (the most useful one)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>In &lt;code>concurrent&lt;/code> mode, &lt;code>--rate &amp;quot;1,2,4&amp;quot;&lt;/code> launches three benchmarks at those concurrencies
(&lt;a href="https://medium.com/@jajodia.nirjhar/exploring-guidellm-benchmarking-a-live-llm-on-openshift-ccc2d0841794">Medium · GuideLLM on OpenShift&lt;/a>).
The &lt;strong>poisson&lt;/strong> mode is the most realistic for online inference (requests do not arrive at regular
intervals), and the &lt;strong>sweep&lt;/strong> is the one that automates the search for the saturation point.&lt;/p>
&lt;hr>
&lt;h2 id="the-automatic-sweep-from-idle-to-the-knee">The automatic sweep: from idle to the knee&lt;/h2>
&lt;p>The flagship mode. When running a &lt;strong>sweep&lt;/strong> profile, GuideLLM &lt;strong>automatically increases the request rate
from idle to maximum throughput across 10 rounds&lt;/strong>, and produces an &lt;strong>interactive HTML report&lt;/strong> with
detailed latency and throughput (&lt;a href="https://developers.redhat.com/articles/2025/12/24/how-deploy-and-benchmark-vllm-guidellm-kubernetes">Red Hat · GuideLLM on Kubernetes&lt;/a>).
During the sweep, &lt;strong>on detecting saturation it identifies the previous iteration, the knee, and returns
it as estimated capacity&lt;/strong>; if it does not detect saturation, the sweep has to be &lt;strong>extended beyond the
knee&lt;/strong>.&lt;/p>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 250" role="img" aria-label="The GuideLLM sweep: 10 rounds from idle to maximum, throughput saturates and latency blows up, marking the knee as the safe capacity under SLO" xmlns="http://www.w3.org/2000/svg">
&lt;style>.ax{fill:none;stroke:currentColor;stroke-width:1}.cv{fill:none;stroke:currentColor;stroke-width:1.6}.dsh{fill:none;stroke:currentColor;stroke-width:1;stroke-dasharray:4 3}.tl{font:600 12px sans-serif;fill:currentColor}.ts{font:11px sans-serif;fill:currentColor}&lt;/style>
&lt;line class="ax" x1="60" y1="40" x2="60" y2="200"/>
&lt;line class="ax" x1="60" y1="200" x2="720" y2="200"/>
&lt;text x="20" y="120" class="ts" transform="rotate(-90 20 120)">metric&lt;/text>
&lt;text x="330" y="228" class="ts">sweep rounds (idle → maximum) →&lt;/text>
&lt;path class="cv" d="M60,190 C200,150 300,118 410,110 C520,104 620,100 700,98"/>
&lt;text x="600" y="92" class="ts">throughput (saturates)&lt;/text>
&lt;path class="cv" d="M60,182 C260,178 360,168 430,148 C520,116 600,66 700,44"/>
&lt;text x="600" y="40" class="ts">P99 latency (blows up)&lt;/text>
&lt;line class="dsh" x1="430" y1="40" x2="430" y2="200"/>
&lt;text x="392" y="56" class="tl">knee&lt;/text>
&lt;text x="345" y="216" class="ts">estimated capacity (safe under SLO)&lt;/text>
&lt;text x="60" y="245" class="ts">The sweep runs 10 rounds; the knee is the last round before P99 breaks the SLO. It must be extended PAST the knee to see it.&lt;/text>
&lt;/svg>
&lt;/div>
&lt;hr>
&lt;h2 id="a-worked-example-reading-a-10-round-sweep">A worked example: reading a 10-round sweep&lt;/h2>
&lt;p>An illustrative output from a sweep on a 70B on 8×H100 (SLO: TTFT P99 &amp;lt; 500 ms), per round:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Round&lt;/th>
&lt;th>Rate (req/s)&lt;/th>
&lt;th>TTFT P99 (ms)&lt;/th>
&lt;th>ITL P50 (ms)&lt;/th>
&lt;th>Throughput (tok/s)&lt;/th>
&lt;th>Goodput (tok/s)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>2&lt;/td>
&lt;td>95&lt;/td>
&lt;td>19&lt;/td>
&lt;td>480&lt;/td>
&lt;td>480&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>8&lt;/td>
&lt;td>140&lt;/td>
&lt;td>20&lt;/td>
&lt;td>1,900&lt;/td>
&lt;td>1,900&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>5&lt;/td>
&lt;td>14&lt;/td>
&lt;td>240&lt;/td>
&lt;td>22&lt;/td>
&lt;td>3,100&lt;/td>
&lt;td>3,060&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>6&lt;/td>
&lt;td>17&lt;/td>
&lt;td>460&lt;/td>
&lt;td>24&lt;/td>
&lt;td>3,400&lt;/td>
&lt;td>3,330&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>7&lt;/td>
&lt;td>20&lt;/td>
&lt;td>760&lt;/td>
&lt;td>31&lt;/td>
&lt;td>3,700&lt;/td>
&lt;td>2,520&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>9&lt;/td>
&lt;td>26&lt;/td>
&lt;td>1,500&lt;/td>
&lt;td>48&lt;/td>
&lt;td>3,950&lt;/td>
&lt;td>900&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>10&lt;/td>
&lt;td>30&lt;/td>
&lt;td>2,400&lt;/td>
&lt;td>71&lt;/td>
&lt;td>4,000&lt;/td>
&lt;td>380&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>How to read it: up to &lt;strong>round 6&lt;/strong> (17 req/s) the TTFT P99 meets the SLO (460 ms) and goodput ≈ throughput
(3,330 ≈ 3,400). In &lt;strong>round 7&lt;/strong> P99 already breaks (760 ms) and goodput &lt;strong>drops&lt;/strong> to 2,520. The &lt;strong>knee&lt;/strong>
sits between 6 and 7: the safe capacity is that of round 6, &lt;strong>~3,330 tok/s of goodput&lt;/strong>. Rounds 9 and 10
give more raw throughput (3,950, 4,000) but with goodput of 900 and 380; the system is &amp;ldquo;performing&amp;rdquo; by
mostly serving requests that miss the target. Whoever reports &amp;ldquo;4,000 tok/s&amp;rdquo; is describing round 10, where
the system is broken. The defensible number is &lt;strong>3,330 tok/s under TTFT P99 &amp;lt; 500 ms&lt;/strong>, and that is the
one that goes into the sizing. Note as well that the sweep had to reach round 10 (P99 of 2,400 ms) to
&lt;strong>see&lt;/strong> where it broke: that is why it has to be extended beyond the knee.&lt;/p>
&lt;hr>
&lt;h2 id="defining-the-slo-the-number-that-decides-the-knee">Defining the SLO: the number that decides the knee&lt;/h2>
&lt;p>The &amp;ldquo;knee&amp;rdquo; is not absolute: it depends on the &lt;strong>SLO&lt;/strong> you define. A typical online inference SLO:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Metric&lt;/th>
&lt;th>Example threshold&lt;/th>
&lt;th>What it protects&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>TTFT P99&lt;/strong>&lt;/td>
&lt;td>&amp;lt; 500 ms&lt;/td>
&lt;td>the wait for the first token (interactivity)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>TPOT / ITL P95&lt;/strong>&lt;/td>
&lt;td>&amp;lt; 50 ms/token&lt;/td>
&lt;td>the perceived &amp;ldquo;typing speed&amp;rdquo;&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Error rate&lt;/strong>&lt;/td>
&lt;td>&amp;lt; 0.1 %&lt;/td>
&lt;td>reliability&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Goodput&lt;/strong>, the throughput that meets that SLO, is the metric that defines the knee: the safe capacity
is the maximum load where goodput ≈ throughput. Changing the SLO moves the knee: a stricter TTFT SLO
(200 ms) gives an earlier knee (less safe capacity) than a loose one (1 s). That is why &lt;strong>the SLO is
fixed before the sweep&lt;/strong>, and reported alongside the result: a capacity &amp;ldquo;of 3,330 tok/s&amp;rdquo; without saying
under which SLO means nothing.&lt;/p>
&lt;hr>
&lt;h2 id="execution-the-command">Execution: the command&lt;/h2>
&lt;p>An SLO-driven sweep against a vLLM endpoint:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">guidellm benchmark &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --target &lt;span class="s2">&amp;#34;http://vllm:8000&amp;#34;&lt;/span> &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --rate-type sweep &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --max-seconds &lt;span class="m">120&lt;/span> &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --data &lt;span class="s2">&amp;#34;prompt_tokens=1024,output_tokens=256&amp;#34;&lt;/span> &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --output-path resultados.json
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Key parameters: &lt;code>--rate-type sweep&lt;/code> (the automatic ramp), &lt;code>--data&lt;/code> (the length distribution of the load,
which must resemble your real traffic), &lt;code>--max-seconds&lt;/code> (duration per round), &lt;code>--target&lt;/code> (the endpoint).
For the SLO, GuideLLM allows the latency constraints that define goodput to be set. The output goes to
&lt;code>--output-path&lt;/code> in &lt;strong>JSON, YAML or CSV&lt;/strong>, in addition to the interactive HTML report.&lt;/p>
&lt;hr>
&lt;h2 id="defining-the-load---data-decides-the-result">Defining the load: &lt;code>--data&lt;/code> decides the result&lt;/h2>
&lt;p>The &lt;code>--data&lt;/code> parameter (the distribution of prompt and output lengths) changes the knee as much as the
SLO does. Three forms, from least to most faithful:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Load&lt;/th>
&lt;th>&lt;code>--data&lt;/code>&lt;/th>
&lt;th>Fidelity&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Fixed length&lt;/td>
&lt;td>&lt;code>prompt_tokens=1024,output_tokens=256&lt;/code>&lt;/td>
&lt;td>low: real traffic is not fixed&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Synthetic distribution&lt;/td>
&lt;td>length ranges&lt;/td>
&lt;td>medium&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Real traces&lt;/td>
&lt;td>a dataset of your traffic&lt;/td>
&lt;td>high: the knee that applies&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The trap: a sweep with short fixed-length prompts gives an optimistic knee that &lt;strong>does not resemble
production&lt;/strong>, where long prompts dominate the prefill cost and bring the knee forward. To size properly,
feed GuideLLM the &lt;strong>real distribution&lt;/strong> of your traffic (prompt and output lengths measured in
production). The knee of a sweep is only as realistic as the load you put into it; with an unrealistic
&lt;code>--data&lt;/code>, you are sizing for traffic that does not exist.&lt;/p>
&lt;p>The arrival profile matters too: &lt;code>--rate-type poisson&lt;/code> simulates random arrivals (like real online
traffic), while &lt;code>concurrent&lt;/code> keeps N fixed (like a batch). An online service measured with &lt;code>concurrent&lt;/code>
can give a knee different from the real one; for interactive inference, &lt;strong>poisson&lt;/strong> is the honest profile.&lt;/p>
&lt;hr>
&lt;h2 id="the-output-what-to-read">The output: what to read&lt;/h2>
&lt;p>GuideLLM produces &lt;strong>standardised, exportable&lt;/strong> reports for dashboards, analysis and regression tracking,
in JSON, YAML and CSV (&lt;a href="https://developers.redhat.com/articles/2025/12/24/how-deploy-and-benchmark-vllm-guidellm-kubernetes">Red Hat&lt;/a>).
What matters to read, per sweep round:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>TTFT&lt;/strong> (P50, P95, P99) — the latency to the first token.&lt;/li>
&lt;li>&lt;strong>ITL/TPOT&lt;/strong> (P50, P95, P99) — between tokens.&lt;/li>
&lt;li>&lt;strong>Throughput&lt;/strong> (req/s and tok/s) — the raw figure.&lt;/li>
&lt;li>&lt;strong>Goodput&lt;/strong> — the part that meets the SLO (the honest number).&lt;/li>
&lt;/ul>
&lt;p>The interactive HTML report lets you see the &lt;strong>full distributions&lt;/strong> (not just means), which is where the
latency tail that a mean hides becomes visible. For sizing and comparison, the JSON is what gets versioned
and fed into the reproducible harness.&lt;/p>
&lt;hr>
&lt;h2 id="from-the-knee-to-sizing-and-cost">From the knee to sizing and cost&lt;/h2>
&lt;p>This is where GuideLLM connects with the rest of the series. The &lt;strong>replica count&lt;/strong> and the &lt;strong>cost per
token&lt;/strong> come out of the knee:&lt;/p>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 200" role="img" aria-label="From the GuideLLM knee to sizing: goodput per replica, target load, replica count and cost per token" xmlns="http://www.w3.org/2000/svg">
&lt;style>.bx{fill:none;stroke:currentColor;stroke-width:1.3}.tl{font:600 12px sans-serif;fill:currentColor}.ts{font:11px sans-serif;fill:currentColor}.ar{fill:none;stroke:currentColor;stroke-width:1.3;marker-end:url(#gm)}&lt;/style>
&lt;defs>&lt;marker id="gm" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="currentColor"/>&lt;/marker>&lt;/defs>
&lt;rect class="bx" x="20" y="60" width="160" height="48" rx="6"/>&lt;text x="32" y="80" class="tl">Knee (GuideLLM)&lt;/text>&lt;text x="32" y="97" class="ts">goodput per replica&lt;/text>
&lt;path class="ar" d="M180,84 L225,84"/>
&lt;rect class="bx" x="225" y="60" width="160" height="48" rx="6"/>&lt;text x="237" y="80" class="tl">Target load&lt;/text>&lt;text x="237" y="97" class="ts">peak tok/s (SLO)&lt;/text>
&lt;path class="ar" d="M385,84 L430,84"/>
&lt;rect class="bx" x="430" y="60" width="160" height="48" rx="6"/>&lt;text x="442" y="80" class="tl">Replica count&lt;/text>&lt;text x="442" y="97" class="ts">load ÷ goodput&lt;/text>
&lt;path class="ar" d="M590,84 L635,84"/>
&lt;rect class="bx" x="635" y="60" width="125" height="48" rx="6"/>&lt;text x="647" y="80" class="tl">Cost/token&lt;/text>&lt;text x="647" y="97" class="ts">€/h ÷ goodput&lt;/text>
&lt;text x="20" y="150" class="ts">The goodput at the knee (not raw throughput) is the denominator of sizing and of cost per token.&lt;/text>
&lt;text x="20" y="172" class="ts">Sizing with raw throughput overstates goodput and breaks the SLO in production.&lt;/text>
&lt;/svg>
&lt;/div>
&lt;p>The calculation: if the knee gives a &lt;strong>goodput of 3,330 tok/s per replica&lt;/strong> and your peak target load is
&lt;strong>20,000 tok/s&lt;/strong>, you need &lt;strong>6 replicas&lt;/strong> (20,000 ÷ 3,330 ≈ 6.0). And the cost per token comes from the
replica cost (from OpenCost, ~11 €/h) divided by its goodput: ~0.92 €/1M tokens. It is the bridge to
&lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">capacity planning&lt;/a> and to cost per token:
&lt;strong>the correct denominator is the goodput at the knee&lt;/strong>, not catalogue throughput. Sizing with raw
throughput leaves you short of useful capacity and breaks the SLO in production.&lt;/p>
&lt;hr>
&lt;h2 id="deployment-as-a-kubernetes-job">Deployment as a Kubernetes Job&lt;/h2>
&lt;p>GuideLLM runs as a &lt;strong>Kubernetes Job inside the cluster&lt;/strong> to benchmark models served by the orchestration
platform (&lt;a href="https://developers.redhat.com/articles/2025/12/24/how-deploy-and-benchmark-vllm-guidellm-kubernetes">Red Hat&lt;/a>).
This matters for fidelity: the load generator runs &lt;strong>inside the cluster&lt;/strong>, on the same network as the
endpoint, so it measures the engine without the network latency of an external client. The Job is
parameterised with the target, the rate-type and the load, and dumps the JSON to a volume or a store for
versioning. Running it as a Job also makes automation easier (a CronJob for periodic benchmarking, or
triggered from CI).&lt;/p>
&lt;hr>
&lt;h2 id="slo-validation-in-ci-catching-regressions">SLO validation in CI: catching regressions&lt;/h2>
&lt;p>The most valuable use in the medium term: a &lt;strong>Job that runs a short sweep on every change&lt;/strong> (a vLLM
release, a config change) and &lt;strong>compares the goodput against the baseline&lt;/strong>. If goodput drops by more than
a threshold or the knee moves earlier, the pipeline fails. Since GuideLLM exports standardised JSON for
&lt;strong>regression tracking&lt;/strong>, comparing two runs is trivial. That way a performance regression, which is a cost
and capacity regression, is caught at the commit, not in production. The full sweep is not needed on every
commit: a short sweep covering the knee is enough to catch the regression; the exhaustive one is for
releases.&lt;/p>
&lt;hr>
&lt;h2 id="comparing-configurations-with-sweeps">Comparing configurations with sweeps&lt;/h2>
&lt;p>GuideLLM shines for &lt;strong>deciding between configurations&lt;/strong> by running the same sweep against each one. The
fair protocol: same load (&lt;code>--data&lt;/code>), same SLO, same hardware, varying only the config. Examples of
decisions that a sweep settles with data:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Decision&lt;/th>
&lt;th>What to compare&lt;/th>
&lt;th>What the knee reveals&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>FP16 vs FP8&lt;/td>
&lt;td>two deployments of the same model&lt;/td>
&lt;td>FP8 usually gives a higher knee (more goodput)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>max-num-seqs&lt;/code>&lt;/td>
&lt;td>different values of the flag&lt;/td>
&lt;td>the one that maximises goodput under the SLO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>vLLM vs SGLang&lt;/td>
&lt;td>two engines, same model&lt;/td>
&lt;td>which engine gives more goodput at your SLO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>KV size/precision&lt;/td>
&lt;td>KV cache configs&lt;/td>
&lt;td>the effect on capacity&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Each sweep gives a knee; the highest knee under the same SLO wins. It is the controlled experiment that
fills the scorecard row (article B8): not &amp;ldquo;X is faster&amp;rdquo; in the abstract, but &amp;ldquo;X gives Y tok/s more goodput
under this specific SLO, which translates into Z fewer replicas and W € less per million tokens&amp;rdquo;.&lt;/p>
&lt;hr>
&lt;h2 id="watching-the-three-axes-during-the-sweep">Watching the three axes during the sweep&lt;/h2>
&lt;p>A trick that connects with the cost and energy track: &lt;strong>while the sweep runs, capture the GPU metrics with
DCGM&lt;/strong>. That way each round yields the goodput (GuideLLM), the average power (DCGM → J/token) and the cost
(node price → €/token) at once. In a single sweep campaign you measure the three axes of the scorecard for
every operating point, and they come out coherent by construction (same instant, same load). Instead of an
isolated performance benchmark, you get the &lt;strong>complete row&lt;/strong>, cost, performance, energy, for the knee,
which is exactly what the proposal needs. Align the time windows (the DCGM power and the GuideLLM metrics
must cover the same interval) or the J/token does not correspond to the measured goodput.&lt;/p>
&lt;hr>
&lt;h2 id="interpreting-the-distributions-not-just-the-knee">Interpreting the distributions, not just the knee&lt;/h2>
&lt;p>The knee is the headline, but the GuideLLM HTML report gives &lt;strong>full distributions&lt;/strong>, and there is
information there that the knee summarises away. Three additional readings:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>The shape of the tail.&lt;/strong> Two configs with the same P99 can have different tails: one with P99 at
500 ms and P99.9 at 600 ms is stable; another with P99 at 500 ms and P99.9 at 3,000 ms has a long tail
that will hit some users severely. The mean, and even P99, hide it; the distribution shows it.&lt;/li>
&lt;li>&lt;strong>The TTFT/ITL split.&lt;/strong> Seeing the two distributions separately tells you whether the bottleneck is
prefill (high TTFT) or decode (high ITL), which steers the optimisation (more concurrency vs chunked
prefill, and so on).&lt;/li>
&lt;li>&lt;strong>The spread across rounds.&lt;/strong> If goodput varies a lot between rounds at the same rate, the system is
unstable under load, something a single capacity number does not reveal.&lt;/li>
&lt;/ul>
&lt;p>The knee sizes; the distributions diagnose. For a proposal, the knee is the datum; for operating and
optimising, the distributions are where you see what to fix.&lt;/p>
&lt;hr>
&lt;h2 id="guidellm-in-the-reproducible-harness">GuideLLM in the reproducible harness&lt;/h2>
&lt;p>GuideLLM fits as the load engine of the reproducible harness (article S4). The pattern:&lt;/p>
&lt;ol>
&lt;li>A &lt;strong>script/Job&lt;/strong> that deploys the engine with the pinned config, warms up, runs the sweep and dumps the
JSON with all the metadata (model, version, hardware, &lt;code>--data&lt;/code>, SLO).&lt;/li>
&lt;li>&lt;strong>Named by date and config&lt;/strong> to version the runs.&lt;/li>
&lt;li>A &lt;strong>store&lt;/strong> (a git repo of JSONs or a bucket) to reproduce and compare.&lt;/li>
&lt;li>&lt;strong>DCGM&lt;/strong> capturing in parallel to add the energy to each point.&lt;/li>
&lt;/ol>
&lt;p>That way &amp;ldquo;reproduce the knee of this config&amp;rdquo; is one command, not an afternoon, and comparing two releases
is a JSON diff. It is what turns benchmarking from a one-off activity into a continuous capability, and
what lets the capacity figure in the proposal come with the bench to reproduce it.&lt;/p>
&lt;hr>
&lt;h2 id="the-cost-of-a-sweep-in-euros">The cost of a sweep (in euros)&lt;/h2>
&lt;p>A 10-round sweep at ~2 minutes per round occupies the node for ~20–30 minutes. At an amortised cost of
~11 €/h, that is &lt;strong>~4–5.5 € per full sweep&lt;/strong> of a model. Not much per run, but a continuous benchmarking
programme (every release, every config, several models) adds up; hence the value of automating the sweep as
a reproducible Job and running &lt;strong>short&lt;/strong> sweeps in CI (only around the knee), reserving the exhaustive one
for releases. The cost of measuring is part of the cost of the platform, and small next to the cost of
sizing badly.&lt;/p>
&lt;hr>
&lt;h2 id="the-slo-by-use-case-the-knee-moves-with-it">The SLO by use case: the knee moves with it&lt;/h2>
&lt;p>Since the SLO defines the knee, different use cases give different capacities &lt;strong>on the same hardware&lt;/strong>.
Worth keeping in mind when sizing:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Use case&lt;/th>
&lt;th>Typical SLO&lt;/th>
&lt;th>Effect on the knee&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Interactive chat&lt;/td>
&lt;td>TTFT P99 &amp;lt; 500 ms, ITL &amp;lt; 50 ms&lt;/td>
&lt;td>early knee (latency rules)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Code copilot&lt;/td>
&lt;td>TTFT P99 &amp;lt; 300 ms&lt;/td>
&lt;td>even earlier knee&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Batch / summarisation&lt;/td>
&lt;td>no TTFT SLO, maximise throughput&lt;/td>
&lt;td>late knee (almost pure throughput)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Agent (multi-step)&lt;/td>
&lt;td>bounded per-step latency&lt;/td>
&lt;td>depends on the number of steps&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The same GPU serves &lt;strong>more&lt;/strong> batch load than interactive chat load, because the batch SLO is loose. That is
why sizing requires &lt;strong>one sweep per load profile&lt;/strong>: there is no &amp;ldquo;the node&amp;rsquo;s capacity&amp;rdquo;, there is &amp;ldquo;the node&amp;rsquo;s
capacity for this SLO&amp;rdquo;. Mixing loads with different SLOs in the same pool without separating them is a
classic source of broken SLOs, with batch saturating and interactive chat paying for it. The fix connects
with scheduling: separate pools or priorities by SLO.&lt;/p>
&lt;hr>
&lt;h2 id="guidellm-vs-the-others-when-to-use-which">GuideLLM vs the others: when to use which&lt;/h2>
&lt;p>To place it against the tools from B2:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Question&lt;/th>
&lt;th>Tool&lt;/th>
&lt;th>Why&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&amp;ldquo;How far can I load without breaking the SLO?&amp;rdquo;&lt;/td>
&lt;td>&lt;strong>GuideLLM&lt;/strong>&lt;/td>
&lt;td>SLO-driven sweep, the knee&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&amp;ldquo;What is the endpoint&amp;rsquo;s maximum capacity?&amp;rdquo;&lt;/td>
&lt;td>AIPerf&lt;/td>
&lt;td>automatic saturation detection&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&amp;ldquo;Does my vLLM flag change help?&amp;rdquo;&lt;/td>
&lt;td>vllm bench serve&lt;/td>
&lt;td>fast, native to the engine&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&amp;ldquo;Which hardware/engine is better in the abstract?&amp;rdquo;&lt;/td>
&lt;td>read MLPerf&lt;/td>
&lt;td>cross-vendor comparability&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>GuideLLM is the tool for &lt;strong>sizing under an SLO&lt;/strong>: when the question is operational (how many replicas, what
cost per token at my SLO), it is the most direct answer. AIPerf and GuideLLM overlap (both multi-process);
the practical difference is that GuideLLM is more oriented to the SLO and the reproducible report, and
AIPerf to maximum capacity with automatic detection. Many teams use both; what must not be done is to
compare a result from one with a result from the other as if they were the same measurement.&lt;/p>
&lt;hr>
&lt;h2 id="checklist-for-a-defensible-sweep">Checklist for a defensible sweep&lt;/h2>
&lt;p>For the knee of a sweep to support a sizing decision:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Step&lt;/th>
&lt;th>Check&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Realistic load&lt;/td>
&lt;td>&lt;code>--data&lt;/code> with your traffic&amp;rsquo;s distribution (or poisson)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Declared SLO&lt;/td>
&lt;td>TTFT/TPOT with a fixed percentile and threshold&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Extended sweep&lt;/td>
&lt;td>reaches the point where P99 breaks (past the knee)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Goodput, not throughput&lt;/td>
&lt;td>capacity is the goodput under the SLO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Job in the cluster&lt;/td>
&lt;td>no network latency from an external client&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Versioned output&lt;/td>
&lt;td>JSON with all the metadata&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DCGM in parallel&lt;/td>
&lt;td>energy per point, optional but recommended&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>If you can tick the seven boxes, the knee is an auditable datum; if any is missing, it is an anecdote. The
sizing in the proposal hangs on these seven being green.&lt;/p>
&lt;hr>
&lt;h2 id="limits-and-traps-data-driven">Limits and traps (data-driven)&lt;/h2>
&lt;ol>
&lt;li>&lt;strong>Not extending the sweep beyond the knee.&lt;/strong> If saturation is not detected, the estimated capacity is
the last round tested, not the real knee. Extend it until P99 breaks.&lt;/li>
&lt;li>&lt;strong>Unrealistic load.&lt;/strong> A fixed-length &lt;code>--data&lt;/code> does not resemble your traffic; use the real distribution
(or poisson) for a knee that applies.&lt;/li>
&lt;li>&lt;strong>Reporting throughput, not goodput.&lt;/strong> The knee is defined by goodput under the SLO; raw throughput
overestimates capacity.&lt;/li>
&lt;li>&lt;strong>Undeclared SLO.&lt;/strong> A capacity without the SLO it was measured under is neither comparable nor
defensible.&lt;/li>
&lt;li>&lt;strong>Client outside the cluster.&lt;/strong> Running GuideLLM from outside puts network latency into the measurement;
run it as a Job inside the cluster.&lt;/li>
&lt;/ol>
&lt;p>With GuideLLM mastered, you have the tool that turns performance into an actionable datum: the knee, the
sizing and the cost per token, all from a reproducible sweep. The next article (B4) goes into NVIDIA&amp;rsquo;s
AIPerf; this one closes SLO validation, which is what sizes the proposal.&lt;/p>
&lt;h2 id="closing">Closing&lt;/h2>
&lt;p>GuideLLM answers the only performance question that sizes a platform: &lt;strong>how far can I load without breaking
the SLO?&lt;/strong> And it answers it with the right discipline: a sweep from idle to saturation that finds the knee,
defined by goodput under a declared SLO, over a load that resembles the real one. Everything the proposal
needs comes out of that knee: the replica count, the cost per token (with goodput as the denominator, not
catalogue throughput) and, if you capture DCGM during the sweep, the energy per token as well. The mistake
that invalidates the exercise is the usual one: reporting peak throughput instead of goodput, measuring with
an unrealistic load, or not extending the sweep until you see where it breaks. Done properly, as a Job
inside the cluster, with the real distribution, the SLO fixed and the output in versioned JSON, GuideLLM
turns performance from a marketing figure into a reproducible datum that survives an audit and sizes a
sovereign architecture with numbers. The knee is not the fastest point; it is the point where your platform
still delivers what it promised.&lt;/p>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/genai-perf-llm-inference-profiling-in-depth/">GenAI-Perf in depth&lt;/a> — NVIDIA&amp;rsquo;s profiler and how it compares with GuideLLM data sheet by data sheet (rate-types, concurrency sweep, metrics).&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-serving-engines-pareto-frontier-comparison/">LLM serving engines compared (vLLM/SGLang/TRT-LLM/Dynamo)&lt;/a> — after validating the SLOs with GuideLLM, this comparison decides which engine meets the goodput-latency Pareto frontier.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/measurement-bias-reproducibility-llm-benchmarks/">Measurement bias and reproducibility&lt;/a> — the setup errors that make a concurrency sweep non-reproducible, even when the tool is correctly configured.&lt;/li>
&lt;/ul>
&lt;h2 id="sources">Sources&lt;/h2>
&lt;ul>
&lt;li>Red Hat · GuideLLM: evaluar despliegues LLM para inferencia real — &lt;a href="https://developers.redhat.com/articles/2025/06/20/guidellm-evaluate-llm-deployments-real-world-inference">https://developers.redhat.com/articles/2025/06/20/guidellm-evaluate-llm-deployments-real-world-inference&lt;/a>&lt;/li>
&lt;li>Red Hat · desplegar y benchmarkear vLLM con GuideLLM en Kubernetes — &lt;a href="https://developers.redhat.com/articles/2025/12/24/how-deploy-and-benchmark-vllm-guidellm-kubernetes">https://developers.redhat.com/articles/2025/12/24/how-deploy-and-benchmark-vllm-guidellm-kubernetes&lt;/a>&lt;/li>
&lt;li>GuideLLM · PyPI — &lt;a href="https://pypi.org/project/guidellm/">https://pypi.org/project/guidellm/&lt;/a>&lt;/li>
&lt;li>GuideLLM · GitHub (proyecto vLLM) — &lt;a href="https://github.com/vllm-project/guidellm">https://github.com/vllm-project/guidellm&lt;/a>&lt;/li>
&lt;li>Medium · GuideLLM en OpenShift (rate-types, ejemplo) — &lt;a href="https://medium.com/@jajodia.nirjhar/exploring-guidellm-benchmarking-a-live-llm-on-openshift-ccc2d0841794">https://medium.com/@jajodia.nirjhar/exploring-guidellm-benchmarking-a-live-llm-on-openshift-ccc2d0841794&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Capacity planning for on-premise LLM inference: how to size GPUs from an SLO</title><link>https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/</link><pubDate>Mon, 01 Jun 2026 15:00:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/</guid><description>&lt;blockquote>
&lt;p>This post complements the ones on &lt;a href="https://blog.lo0.es/en/posts/kv-cache-working-memory-llm-inference/">KV cache&lt;/a> (the piece that dominates the VRAM budget), &lt;a href="https://blog.lo0.es/en/posts/continuous-batching-orca-vllm-chunked-prefill-goodput/">Continuous batching&lt;/a> (what defines the effective utilisation of the compute) and &lt;a href="https://blog.lo0.es/en/posts/anatomy-on-premise-llm-inference-stack-seven-layers/">Seven layers of the stack&lt;/a> (the pieces the sizing takes for granted). Before reading this one, make sure your team has written down the SLOs it is going to chase; without that input the calculation is not defensible.&lt;/p>
&lt;/blockquote>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>LLM inference capacity planning does not answer &amp;ldquo;how many tokens per second does a GPU give&amp;rdquo; — that question has no universal answer, because throughput depends on concurrency, the prefill/decode split, context length, the inference engine and quantisation. The right question has three inputs (&lt;strong>SLO&lt;/strong>: TTFT P95, TPOT P95, sustained RPS), a hardware reference (GPU model, VRAM, HBM bandwidth, effective FLOPs) and a model (parameters, GQA/MHA/MoE architecture, weight format). The calculation resolves into two coupled budgets that cross each other. &lt;strong>VRAM budget&lt;/strong>: from the GPU&amp;rsquo;s total you subtract model weights and activations, what remains is the &lt;strong>KV cache budget&lt;/strong>, and from there you derive the &lt;strong>maximum concurrency&lt;/strong> possible at the average context you expect. &lt;strong>Time budget&lt;/strong>: the engine (vLLM, SGLang, TensorRT-LLM) has a tokens/s ceiling in decode given by HBM bandwidth and another in prefill given by useful FLOPs; from there you derive the &lt;strong>expected TPOT&lt;/strong> and, dividing prefill_tokens by prefill throughput, the &lt;strong>expected TTFT&lt;/strong>. Both budgets must meet the SLO &lt;strong>simultaneously&lt;/strong>: whichever is tighter dictates the sizing. On the Llama 70B BF16 example with tensor parallel 4 on 4×H100 SXM, a single replica saturates at ~28 concurrent requests and delivers ~3,200 tokens/s of aggregate decode with a median TPOT of 35 ms; for 200 sustained RPS at a profile of 800 prompt tokens + 250 of output, you need between 4 and 5 replicas with a 25 % cushion over the observed peak. Quantisation (FP8 → INT4) divides VRAM cost and decode time by between 1.5 and 4×, but it degrades quality measurably — it is not assumed free, it is validated with evals. The five habitual traps: confusing the mean with P95, ignoring the prefill/decode split of the real workload, sizing without head-room for retraining or rollback, forgetting that a GPU at 100 % SM util means nothing if the HBM is saturated, and not documenting the assumptions behind the calculation (a sizing with no written assumptions is a throwaway calculation).&lt;/p>
&lt;h2 id="you-are-here-deploy-with-one-foot-in-observe">You are here: DEPLOY (with one foot in OBSERVE)&lt;/h2>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 90" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="you are here: Deploy with one foot in Observe">
&lt;style>.box{stroke:#444;stroke-width:1.4;rx:6}.active{fill:#ffb347;stroke-width:3}.semiactive{fill:#ffe1b3;stroke-width:2}.idle{fill:#f4f4f4}.lbl{font:600 12px sans-serif;fill:#222}.arr{stroke:#666;stroke-width:1.4;fill:none;marker-end:url(#cpm)}.cyc{stroke:#888;stroke-width:1.2;fill:none;stroke-dasharray:4 2;marker-end:url(#cpm)}&lt;/style>
&lt;defs>&lt;marker id="cpm" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#666"/>&lt;/marker>&lt;/defs>
&lt;text x="390" y="20" text-anchor="middle" class="lbl">You are here: capacity planning · closes DEPLOY and opens the conversation with OBSERVE&lt;/text>
&lt;rect x="30" y="35" width="110" height="35" class="box idle"/>&lt;text x="85" y="58" text-anchor="middle" class="lbl">1 · Data&lt;/text>
&lt;rect x="155" y="35" width="110" height="35" class="box idle"/>&lt;text x="210" y="58" text-anchor="middle" class="lbl">2 · Tune&lt;/text>
&lt;rect x="280" y="35" width="110" height="35" class="box idle"/>&lt;text x="335" y="58" text-anchor="middle" class="lbl">3 · Eval&lt;/text>
&lt;rect x="405" y="35" width="110" height="35" class="box active"/>&lt;text x="460" y="58" text-anchor="middle" class="lbl">4 · Deploy&lt;/text>
&lt;rect x="530" y="35" width="110" height="35" class="box semiactive"/>&lt;text x="585" y="58" text-anchor="middle" class="lbl">5 · Observe&lt;/text>
&lt;rect x="655" y="35" width="110" height="35" class="box idle"/>&lt;text x="710" y="58" text-anchor="middle" class="lbl">6 · Retrain&lt;/text>
&lt;path class="arr" d="M140,52 L155,52"/>&lt;path class="arr" d="M265,52 L280,52"/>&lt;path class="arr" d="M390,52 L405,52"/>&lt;path class="arr" d="M515,52 L530,52"/>&lt;path class="arr" d="M640,52 L655,52"/>
&lt;path class="cyc" d="M710,72 L710,82 L85,82 L85,72"/>
&lt;/svg>
&lt;/div>
&lt;p>Capacity planning is a piece with dual residency. It lives in &lt;strong>DEPLOY&lt;/strong> because without a valid sizing you do not buy hardware or configure the inference engine. But its &lt;strong>input is real observations&lt;/strong>: the distribution of prompt and output lengths, the prefill/decode mix of the workload, the real P95s already being seen in pre-production. Without that data the calculation is a napkin sketch, defensible only until the first customer arrives who does not fit the assumed average.&lt;/p>
&lt;h2 id="the-analogy-the-hotel-with-variable-sized-rooms">The analogy: the hotel with variable-sized rooms&lt;/h2>
&lt;p>Imagine a hotel where the rooms have no fixed size: each guest pays for the square metres they need, and the building&amp;rsquo;s floor plan reorganises itself dynamically to accommodate whoever arrives. Management wants to maximise occupancy, but it has two real constraints and one quality metric.&lt;/p>
&lt;p>&lt;strong>Constraint 1 — physical space.&lt;/strong> The floor has 1,000 m² in total. If a family comes in needing 200 m², that family occupies that surface and it cannot be handed to the next guest. The largest room limits how many simultaneous guests fit.&lt;/p>
&lt;p>&lt;strong>Constraint 2 — service staff.&lt;/strong> There are 10 receptionists. Each can handle the check-in of one guest every two minutes. When 60 guests arrive within an hour, the last ones wait in a queue; the time from walking into reception to receiving their key depends on how many are ahead of them.&lt;/p>
&lt;p>&lt;strong>Quality metric — a promise about time.&lt;/strong> The brochure says &amp;ldquo;check-in in under 15 minutes&amp;rdquo;. If too many guests arrive at once, that promise breaks even if there is physical space free.&lt;/p>
&lt;p>The physical space is the GPU&amp;rsquo;s VRAM. Each room is a request with its KV cache (larger the longer the conversation). The receptionists are the compute units (Streaming Multiprocessors + Tensor Cores). The check-in is the prefill phase; the nights the guest spends afterwards are the decode steps. The 15-minute promise is the TTFT P95 SLO.&lt;/p>
&lt;p>The hotel&amp;rsquo;s capacity planning is exactly this: given the expected guest profile (how many arrive per hour, how much space they ask for on average, how many minutes of waiting they tolerate), work out how many floors and how many receptionists are needed. It is not done by estimating &amp;ldquo;rooms per hour&amp;rdquo; in the abstract; it is done by crossing the two budgets with the promise about time. The analogy holds up the calculation all the way to the end.&lt;/p>
&lt;h2 id="the-three-slo-inputs">The three SLO inputs&lt;/h2>
&lt;p>Before putting a single number on the sheet, you have to write down the three dimensions of the SLO. Without this, the calculation is aesthetics, not engineering.&lt;/p>
&lt;p>&lt;strong>TTFT P95 (Time-To-First-Token).&lt;/strong> The time from the client sending the request until it receives the first token. It is dominated by the prefill phase (processing the whole prompt in one go) plus the scheduler queue. For conversational chat, a reasonable target sits between 0.5 and 2 seconds P95. For coding assistants with large prompts (5–10 K tokens of context), between 2 and 4 s P95. Below 500 ms you enter UX territory for voice-style conversations, but that demands serious architectural compromises.&lt;/p>
&lt;p>&lt;strong>TPOT P95 (Time-Per-Output-Token).&lt;/strong> The time between consecutive tokens during decode. It dominates the &amp;ldquo;perceived fluency&amp;rdquo; of streaming. Above 80 ms/token the human reader perceives pauses; below 30 ms/token the output flows faster than it can be read. The usual industry target: 40–60 ms P95.&lt;/p>
&lt;p>&lt;strong>Sustained RPS meeting the SLO.&lt;/strong> The throughput the system must support &lt;strong>without violating&lt;/strong> TTFT or TPOT. This is DistServe&amp;rsquo;s key metric, called &lt;strong>goodput&lt;/strong> (see &lt;a href="https://blog.lo0.es/en/posts/continuous-batching-orca-vllm-chunked-prefill-goodput/">Continuous batching&lt;/a>). &amp;ldquo;200 RPS peak&amp;rdquo; is not the same as &amp;ldquo;200 RPS with TTFT P95 ≤ 1.5 s&amp;rdquo;. Without the SLO condition, the RPS number means nothing.&lt;/p>
&lt;p>These three dimensions come with a &lt;strong>workload profile&lt;/strong>: the distribution of prompt and output lengths. Medians are not enough; you need P50, P95, P99. A badly measured profile is the main reason sizings fail.&lt;/p>
&lt;h2 id="the-central-formula-two-budgets-that-cross">The central formula: two budgets that cross&lt;/h2>
&lt;p>The calculation resolves into two independent sums that are then crossed. The smaller of the two rules.&lt;/p>
&lt;h3 id="vram-budget">VRAM budget&lt;/h3>
&lt;p>For a GPU with total VRAM $V$, the space available for KV cache is:&lt;/p>
$$V_{\text{kv}} = V - V_{\text{model}} - V_{\text{activations}} - V_{\text{overhead}}$$
&lt;p>where:&lt;/p>
&lt;ul>
&lt;li>$V_{\text{model}}$ is the size of the weights: for a model of $P$ parameters in a format of $b$ bytes/parameter, $V_{\text{model}} = P \cdot b$. Llama 70B BF16 = $70 \times 10^9 \times 2 = 140$ GB. Under tensor parallel TP=4, each GPU carries $140 / 4 = 35$ GB.&lt;/li>
&lt;li>$V_{\text{activations}}$ are the intermediate buffers of the forward pass. For vLLM with a reasonable batch, between 2 and 6 GB per GPU depending on batch size and maximum length.&lt;/li>
&lt;li>$V_{\text{overhead}}$ is the CUDA context, NCCL buffers, the PagedAttention pool, reserved paged blocks. 2–4 GB typical.&lt;/li>
&lt;/ul>
&lt;p>The KV cache budget per GPU is what is left over. For an H100 SXM 80 GB with Llama 70B TP=4 BF16:&lt;/p>
$$V_{\text{kv}} = 80 - 35 - 4 - 3 = 38 \text{ GB per GPU} = 152 \text{ GB aggregated over TP=4}$$
&lt;p>The KV cache cost per token for a model with $L$ layers, $H_{\text{kv}}$ KV heads (GQA), per-head dimension $d_h$, in a format of $b$ bytes:&lt;/p>
$$\text{kv per token} = 2 \cdot L \cdot H_{\text{kv}} \cdot d_h \cdot b$$
&lt;p>The factor of 2 is because both K and V are stored. For Llama 70B (L=80, $H_{\text{kv}}$=8 with GQA, $d_h$=128, BF16 = 2 bytes):&lt;/p>
$$\text{kv per token} = 2 \cdot 80 \cdot 8 \cdot 128 \cdot 2 = 327,680 \text{ bytes} = 320 \text{ KB/token}$$
&lt;p>And the maximum concurrency at average context $C$:&lt;/p>
$$N_{\text{max}} = \frac{V_{\text{kv}}}{C \cdot \text{kv per token}}$$
&lt;p>With an aggregated $V_{\text{kv}}$ of 152 GB and an average context of 1,500 tokens (800 prompt + 700 generated at the worst moment of the conversation):&lt;/p>
$$N_{\text{max}} = \frac{152 \times 10^9}{1,500 \cdot 320 \times 10^3} \approx 316 \text{ concurrent requests}$$
&lt;p>This is the &lt;strong>physical ceiling&lt;/strong> of concurrency for that replica. It is not what you are going to use; it is what you &lt;strong>cannot exceed&lt;/strong> without OOM. The operational number sits well below it (head-room for spikes).&lt;/p>
&lt;h3 id="time-budget">Time budget&lt;/h3>
&lt;p>Two sub-calculations come in here: decode (memory-bound) and prefill (compute-bound).&lt;/p>
&lt;p>&lt;strong>Decode TPOT.&lt;/strong> For every token generated, the model weights (the ones relevant to that request) have to be walked through and the accumulated KV cache has to be read. The bottleneck is HBM bandwidth. For a GPU with bandwidth $B$ GB/s and a model of $V_{\text{model per gpu}}$ GB of weights:&lt;/p>
$$\text{tpot}_{\text{theoretical}} \approx \frac{V_{\text{model per gpu}}}{B}$$
&lt;p>For an H100 SXM with HBM3 at 3.35 TB/s and Llama 70B TP=4 BF16 (35 GB/GPU):&lt;/p>
$$\text{tpot}_{\text{theoretical}} \approx \frac{35}{3,350} \approx 10.4 \text{ ms/token}$$
&lt;p>This is the &lt;strong>best theoretical case&lt;/strong> with batch=1 and 100 % HBM efficiency. In practice vLLM on H100 with Llama 70B TP=4 reaches 12–18 ms/token at low batch and 30–45 ms/token at high batch (at concurrency 32, tokens compete for the shared HBM). The defensible operational number: &lt;strong>35 ms/token&lt;/strong> at concurrency 24–32.&lt;/p>
&lt;p>&lt;strong>Prefill throughput.&lt;/strong> Prefill processes N prompt tokens in a single forward pass. It is compute-bound: the bottleneck is FLOPs. For an H100 SXM with 989 sustained BF16 TFLOPs and Llama 70B (each forward pass costs roughly $2 \cdot P \cdot N$ FLOPs per sequence of length N):&lt;/p>
$$\text{prefill tps} = \frac{4 \cdot \text{TFLOPs} \cdot \eta}{2 \cdot P} = \frac{4 \cdot 989 \times 10^{12} \cdot 0.5}{2 \cdot 70 \times 10^9} \approx 14,000 \text{ tokens/s}$$
&lt;p>(the factor of 4 is the GPUs in TP, $\eta$ is real efficiency between 0.4 and 0.6 on H100). An 800-token prompt takes this long in prefill:&lt;/p>
$$\text{prefill time} = \frac{800}{14,000} \approx 57 \text{ ms}$$
&lt;p>Adding a typical queue of 100–300 ms at high concurrency, &lt;strong>TTFT P95 ≈ 350–500 ms&lt;/strong> for that profile. Well below the 1.5 s target; there is margin.&lt;/p>
&lt;h3 id="the-crossing">The crossing&lt;/h3>
&lt;p>The real operational concurrency $N_{\text{op}}$ is the minimum of &lt;strong>the VRAM ceiling&lt;/strong>, the concurrency at which &lt;strong>TPOT starts to degrade&lt;/strong> past the SLO, and the concurrency at which &lt;strong>TTFT starts to degrade&lt;/strong> past the SLO (prefill queue). For the example:&lt;/p>
&lt;ul>
&lt;li>VRAM ceiling: 316.&lt;/li>
&lt;li>TPOT degrades to 80 ms (SLO) at around concurrency ~80–100 (measured empirically with a benchmark, not a closed formula).&lt;/li>
&lt;li>TTFT degrades to 1.5 s at around concurrency ~40–60 because of the prefill queue.&lt;/li>
&lt;/ul>
&lt;p>The replica&amp;rsquo;s operational concurrency is ~50. Applying 25 % head-room for spikes and rebalancing, &lt;strong>target concurrency per replica ≈ 35–40&lt;/strong>.&lt;/p>
&lt;h2 id="step-by-step-worksheet-llama-70b-bf16-on-4h100-sxm">Step-by-step worksheet: Llama 70B BF16 on 4×H100 SXM&lt;/h2>
&lt;p>The exercise&amp;rsquo;s input:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>SLO&lt;/strong>: TTFT P95 ≤ 1.5 s; TPOT P95 ≤ 60 ms; &lt;strong>200 sustained RPS&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Workload&lt;/strong>: prompt P50=600, P95=1,200, P99=2,500; output P50=180, P95=500, P99=900. Average prompt 800, output 250.&lt;/li>
&lt;li>&lt;strong>Generic hardware&lt;/strong>: 4×H100 SXM 80 GB with NVLink, vLLM v1 engine, tensor parallel 4, BF16.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Step 1 — VRAM per GPU.&lt;/strong> Weights 35 GB, activations 4 GB, overhead 3 GB → KV budget 38 GB/GPU = 152 GB aggregated. KV/token for Llama 70B GQA = 320 KB. Ceiling of live tokens in cache: $152 \times 10^9 / 320 \times 10^3 \approx 475,000$ tokens. At the operational average context (800 prompt + 200 already generated = 1,000 live tokens per request), concurrency ceiling $\approx 475$.&lt;/p>
&lt;p>&lt;strong>Step 2 — average duration of a request.&lt;/strong> Prefill 800 tokens / 14,000 tps = 57 ms. Decode 250 tokens × 35 ms/token = 8,750 ms. Total $\approx 8.8$ s per request.&lt;/p>
&lt;p>&lt;strong>Step 3 — replica throughput.&lt;/strong> If the replica sustains operational concurrency 40 and each request lasts 8.8 s, the replica delivers roughly $40 / 8.8 \approx 4.5$ requests/s in steady state.&lt;/p>
&lt;p>&lt;strong>Step 4 — number of replicas.&lt;/strong> For a 200 RPS target: $200 / 4.5 \approx 45$ replicas. That is 45 × 4 = 180 GPUs. Too much: this sizing does not work because the cost per request is high.&lt;/p>
&lt;p>&lt;strong>Step 5 — review the levers.&lt;/strong> Before buying more hardware, there are three levers to explore, in this order:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Quantisation.&lt;/strong> Dropping to FP8 reduces weights to 17.5 GB/GPU (leaving more VRAM for KV cache → more concurrency), roughly doubles decode tokens/s (HBM saturated by half), and degrades MMLU quality typically by 0.5–1.5 points on models like Llama 70B. Rewriting the calculation in FP8: TPOT drops to ~18 ms, total time per request to 4.7 s, RPS per replica rises to ~8.5, &lt;strong>replicas needed ≈ 24, equivalent to 96 GPUs&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Speculative decoding.&lt;/strong> With a small drafter and 60–70 % acceptance, effective TPOT falls 30–40 %. RPS per replica rises to ~12, &lt;strong>replicas ≈ 17 = 68 GPUs&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Disaggregated serving.&lt;/strong> Separating prefill workers and decode workers lets each be scaled to the real mix of the workload (see &lt;a href="https://blog.lo0.es/en/posts/disaggregated-serving-prefill-decode-specialised-pods/">Disaggregated serving&lt;/a>). It usually shaves off another 20–40 % under asymmetric workloads.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Step 6 — recommended sizing.&lt;/strong> For the example, with FP8 + speculative decoding and 25 % head-room: &lt;strong>20 vLLM replicas at TP=4 over 80 H100 SXM&lt;/strong>. If the team does not want to depend on aggressive quantisation (pure BF16 for maximum fidelity), the calculation rises to &lt;strong>30 replicas = 120 GPUs&lt;/strong> and forces a renegotiation of the SLO or the budget.&lt;/p>
&lt;p>&lt;strong>Step 7 — write down the assumptions.&lt;/strong> This is the part no valid sizing skips. In the team&amp;rsquo;s repo, next to the calculation:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="c"># sizing/llama70b-prod.yaml&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">fecha&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="ld">2026-06-01&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">slo&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">ttft_p95_ms&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">1500&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">tpot_p95_ms&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">60&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">rps_target&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">200&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">workload&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">prompt_tokens_p50&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">600&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">prompt_tokens_p95&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">1200&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">output_tokens_p50&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">180&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">output_tokens_p95&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">500&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">asunto&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">chat productivo con RAG ligero&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">modelo&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">arquitectura&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">llama-70b-instruct&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">formato_pesos&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">fp8&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">motor&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">vllm-v1&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">hardware&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">gpu&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">H100-SXM-80GB&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">topologia&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">TP=4 con NVLink intra-nodo&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">red_inter_replica&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">25&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">GbE&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">optimizaciones&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="l">paged_attention&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="l">chunked_prefill&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="l">speculative_decoding (drafter llama-1.1b, aceptación esperada 65%)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">asunciones_criticas&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">utilizacion_hbm_eficiente&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0.55&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">head_room_pico_sobre_p95&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0.25&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">aceptacion_speculative_min&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0.55&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">plan_validacion&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="l">benchmark vllm bench serve antes de procurement&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="l">canary 10% durante 7 días post-deploy&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Without this YAML, the calculation is not reproducible a month later.&lt;/p>
&lt;h2 id="moe-case-mixtral-822b-141-b-total-39-b-active">MoE case: Mixtral 8×22B (~141 B total, 39 B active)&lt;/h2>
&lt;p>MoEs change the calculation along one key dimension: the total weights are large but the active weights per token are small. For Mixtral 8×22B with top-2 routing:&lt;/p>
&lt;ul>
&lt;li>Weight VRAM: $141 \times 2 = 282$ GB BF16. With TP=4 → 70 GB/GPU. It does not fit in an H100 80 GB alongside KV cache + activations. You need TP=8 (~35 GB/GPU) or FP8 with TP=4 (~35 GB/GPU).&lt;/li>
&lt;li>Decode TPOT: dominated by the weights read per token, which are $\sim 39 / 8 \cdot 2 \approx 9.75$ GB/GPU with TP=4 (one top-2 expert per token, divided across 4 GPUs). On an H100 with HBM at 3.35 TB/s, &lt;strong>theoretical TPOT ≈ 3 ms/token&lt;/strong>. In practice, 10–20 ms at reasonable concurrency.&lt;/li>
&lt;li>Prefill: similar to the dense model of the active weights, ~39 B FLOPs/token.&lt;/li>
&lt;/ul>
&lt;p>MoE sizing usually delivers more RPS per GPU than an equivalent dense model: the low cost per token compensates for the extra VRAM. See &lt;a href="https://blog.lo0.es/en/posts/moe-inference-fundamentals-expert-parallel-deepseek-economics/">MoE inference&lt;/a> for the detail of routing and why a high batch is decisive so that each expert sees enough tokens.&lt;/p>
&lt;h2 id="sensitivity-table-context-and-quantisation">Sensitivity table: context and quantisation&lt;/h2>
&lt;p>For Llama 70B on 4×H100 SXM (TP=4), operational concurrency per replica with an SLO of TTFT 1.5 s / TPOT 60 ms:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Average context&lt;/th>
&lt;th>BF16&lt;/th>
&lt;th>FP8&lt;/th>
&lt;th>INT4 (AWQ)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>500 tokens&lt;/td>
&lt;td>55&lt;/td>
&lt;td>110&lt;/td>
&lt;td>180&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>1,000 tokens&lt;/td>
&lt;td>40&lt;/td>
&lt;td>80&lt;/td>
&lt;td>130&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2,000 tokens&lt;/td>
&lt;td>24&lt;/td>
&lt;td>50&lt;/td>
&lt;td>85&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4,000 tokens&lt;/td>
&lt;td>12&lt;/td>
&lt;td>26&lt;/td>
&lt;td>48&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>8,000 tokens&lt;/td>
&lt;td>6&lt;/td>
&lt;td>13&lt;/td>
&lt;td>25&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Approximate numbers from public vLLM benchmarks as of June 2026, with ±20 % variation depending on engine version and the headroom adopted. To validate on your own hardware: &lt;code>vllm bench serve&lt;/code> with your profile of real prompts.&lt;/p>
&lt;h2 id="the-five-habitual-traps">The five habitual traps&lt;/h2>
&lt;p>&lt;strong>Trap 1 — confusing the mean with P95.&lt;/strong> Average throughput over an hour may be 50 RPS while the 5-minute peak reaches 180 RPS. Sizing against the mean guarantees breaking the SLO at every peak. Rule: size against the hourly P95, with 20–30 % head-room over P95.&lt;/p>
&lt;p>&lt;strong>Trap 2 — not measuring the real prefill/decode split.&lt;/strong> A &amp;ldquo;RAG with short answers&amp;rdquo; workload spends 70–80 % of GPU time in prefill; a &amp;ldquo;writing assistant generating essays&amp;rdquo; spends 80 % in decode. The useful optimisations (chunked prefill vs speculative decoding) change radically. Without measuring it, you buy badly balanced hardware.&lt;/p>
&lt;p>&lt;strong>Trap 3 — sizing with no head-room for retraining or rollback.&lt;/strong> The production cluster is not just the inference engine: there is a re-embedding batch when the embeddings model changes, continuous canary evals (see &lt;a href="https://blog.lo0.es/en/posts/canary-blue-green-shadow-llm-models/">Canary, blue-green and shadow&lt;/a>), light fine-tuning, hot stand-by for rollback. Reserve 15–25 % of capacity for those non-negotiable workloads.&lt;/p>
&lt;p>&lt;strong>Trap 4 — &amp;ldquo;GPU at 100 % SM utilization&amp;rdquo; as a target.&lt;/strong> SM occupancy of 95 % with saturated HBM produces the same throughput as SM at 60 % with saturated HBM. The bottleneck in decode is the HBM. Optimising for &amp;ldquo;GPU usage 100 %&amp;rdquo; without looking at HBM utilisation and arithmetic intensity makes you spend more on GPU without gaining throughput. See &lt;a href="https://blog.lo0.es/en/posts/gpu-observability-llm-inference-twelve-dcgm-vllm-metrics/">GPU observability for LLM inference&lt;/a> for which metrics to actually watch.&lt;/p>
&lt;p>&lt;strong>Trap 5 — not documenting the assumptions.&lt;/strong> A sizing with no reproducible YAML (workload, model, engine, head-room, critical assumptions) leaves the team with no way of knowing what changed when the cluster stops meeting the SLO six months later. Documenting is cheap; losing a quarter to debugging is not.&lt;/p>
&lt;h2 id="applied-to-typical-on-premise-hardware">Applied to typical on-premise hardware&lt;/h2>
&lt;p>For a generic cluster of &lt;strong>4×H100 SXM 80 GB with intra-node NVLink and 25 GbE between nodes&lt;/strong>, the recurring configurations in May 2026 are:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Model&lt;/th>
&lt;th>Format&lt;/th>
&lt;th>TP&lt;/th>
&lt;th>Replicas that fit&lt;/th>
&lt;th>Typical RPS per node (ctx 1K)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Llama 8B&lt;/td>
&lt;td>BF16&lt;/td>
&lt;td>1&lt;/td>
&lt;td>4 (one per GPU)&lt;/td>
&lt;td>240–320&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama 8B&lt;/td>
&lt;td>FP8&lt;/td>
&lt;td>1&lt;/td>
&lt;td>4&lt;/td>
&lt;td>450–600&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama 70B&lt;/td>
&lt;td>BF16&lt;/td>
&lt;td>4&lt;/td>
&lt;td>1&lt;/td>
&lt;td>30–45&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama 70B&lt;/td>
&lt;td>FP8&lt;/td>
&lt;td>4&lt;/td>
&lt;td>1&lt;/td>
&lt;td>60–90&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama 70B&lt;/td>
&lt;td>INT4 AWQ&lt;/td>
&lt;td>2&lt;/td>
&lt;td>2&lt;/td>
&lt;td>90–130&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Mixtral 8×22B&lt;/td>
&lt;td>FP8&lt;/td>
&lt;td>4&lt;/td>
&lt;td>1&lt;/td>
&lt;td>90–140&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Qwen 72B&lt;/td>
&lt;td>BF16&lt;/td>
&lt;td>4&lt;/td>
&lt;td>1&lt;/td>
&lt;td>28–42&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>These numbers are &lt;strong>orders of magnitude to start the conversation&lt;/strong>, not commitments. The definitive sizing is validated with &lt;code>vllm bench serve&lt;/code> or &lt;code>genai-perf&lt;/code> (NVIDIA) using the customer&amp;rsquo;s real prompt/output profile. The prefill/decode asymmetry of each case&amp;rsquo;s workload can move these numbers 30–50 % up or down.&lt;/p>
&lt;p>For clusters of 8×H100 SXM (typical of DGX servers or equivalent replicas), the options open up to TP=8 for 405B-class models or multi-replica TP=2 for 70B models with greater density. The metric that decides is always the same: tokens meeting SLO per kW and per euro of amortised hardware.&lt;/p>
&lt;h2 id="how-the-sizing-is-validated-before-buying">How the sizing is validated before buying&lt;/h2>
&lt;p>The spreadsheet sizing is the first half. The second is the validation benchmark.&lt;/p>
&lt;p>&lt;strong>Stage 1 — back-of-the-envelope sizing.&lt;/strong> This post&amp;rsquo;s formulas applied to the SLO and the expected workload. Output: an approximate number of replicas and a topology.&lt;/p>
&lt;p>&lt;strong>Stage 2 — synthetic micro-benchmark.&lt;/strong> On a borrowed GPU or one rented by the day, bring up the engine with the chosen model and run &lt;code>vllm bench serve&lt;/code> with prompts of representative lengths. Validate TPOT, prefill TPS and the concurrency ceiling. Calibrate the HBM efficiency factor ($\eta$) used in the formulas.&lt;/p>
&lt;p>&lt;strong>Stage 3 — load test with realistic traffic.&lt;/strong> Generate traffic following the real distribution of the customer&amp;rsquo;s workload (not Poisson, not constant: the real trace). Measure P50/P95/P99 of TTFT, TPOT, throughput. Confirm the head-room.&lt;/p>
&lt;p>&lt;strong>Stage 4 — canary in production.&lt;/strong> With the cluster sized, route 5–10 % of real traffic for 7–14 days before closing the procurement of additional hardware. See &lt;a href="https://blog.lo0.es/en/posts/canary-blue-green-shadow-llm-models/">Canary, blue-green and shadow&lt;/a> for the mechanics.&lt;/p>
&lt;p>Jumping from Stage 1 to full procurement is the most frequent cause of a cluster that is 40 % oversized and 60 % undersized at the same time, in different regions of the workload. Four weeks of validation done well save four months of refactoring.&lt;/p>
&lt;h2 id="what-we-have-not-covered-upcoming-articles">What we have not covered (upcoming articles)&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>The observability metrics&lt;/strong> that close the sizing loop in production, see &lt;a href="https://blog.lo0.es/en/posts/gpu-observability-llm-inference-twelve-dcgm-vllm-metrics/">GPU observability for LLM inference&lt;/a>.&lt;/li>
&lt;li>Autoscaling that adjusts replicas to the real traffic curve, see &lt;a href="https://blog.lo0.es/en/posts/llm-inference-autoscaling-kubernetes-hpa-keda/">Autoscaling LLM on Kubernetes&lt;/a>.&lt;/li>
&lt;li>&lt;strong>Detailed cost accounting&lt;/strong> per tenant (showback / chargeback) over the sized hardware.&lt;/li>
&lt;li>&lt;strong>Sizing for continuous fine-tuning&lt;/strong> (PEFT and light training) that shares a cluster with inference.&lt;/li>
&lt;/ul>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/finops-multi-tenancy-gpu-cluster-who-pays/">FinOps and multi-tenancy of the GPU cluster: who pays for what&lt;/a> — translating the sizing into €/token and attributing cost per team.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/kv-cache-working-memory-llm-inference/">KV cache: the working memory that holds up LLM inference&lt;/a> — the component that dominates the VRAM budget.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/continuous-batching-orca-vllm-chunked-prefill-goodput/">Continuous batching&lt;/a> — what defines the effective utilisation of the compute and the goodput metric.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/disaggregated-serving-prefill-decode-specialised-pods/">Disaggregated prefill/decode serving&lt;/a> — an advanced lever for asymmetric workloads.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/moe-inference-fundamentals-expert-parallel-deepseek-economics/">MoE inference&lt;/a> — how the sums change with MoE models.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/quantization-llm-inference-fp8-int4-gguf/">Quantisation for inference&lt;/a> — what each format costs and what it saves.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/anatomy-on-premise-llm-inference-stack-seven-layers/">Seven layers of the on-premise LLM inference stack&lt;/a> — the pieces the sizing takes for granted.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/mixed-nvidia-intel-environments-llm-inference/">Mixed NVIDIA + Intel environments for LLM inference&lt;/a> — the sizing closes better once heterogeneity is accepted: embeddings and reranker on Intel Xeon AMX free up H100s for the large LLM, without buying more GPU.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/numa-hugepages-cpu-isolation-gpu-waits-kernel/">NUMA, hugepages and CPU isolation&lt;/a> and &lt;a href="https://blog.lo0.es/en/posts/cpu-memory-topology-manager-rke2/">RKE2 resource managers&lt;/a> — why the sizing comes to be reasoned per NUMA node rather than per node: you have to discount the reserved housekeeping cores and check that the pod fits on a single NUMA &amp;ldquo;table&amp;rdquo;.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/full-tco-on-premise-gpu-cluster-capex-gpu-hour-break-even/">TCO of the on-premise GPU cluster: amortisation, energy and infrastructure&lt;/a> — the €/GPU-hour that closes the sizing&amp;rsquo;s economic model: once you know how many GPUs you need, here is the real cost of owning them.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/slo-to-number-of-gpus-sizing-justifying-inference-hardware/">Sizing and justifying the investment in GPU&lt;/a> — the full roadmap for turning this sizing into an investment proposal defensible before management: ROI, break-even and sensitivity analysis.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/sizing-agents-decode-bottleneck/">Sizing for agents&lt;/a> — the same method with the inputs changed, when the caller is an agent and not a person.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>Kwon et al. — &lt;em>vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention&lt;/em> (SOSP 2023).&lt;/li>
&lt;li>Zhong et al. — &lt;em>DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM Serving&lt;/em> (OSDI 2024).&lt;/li>
&lt;li>Agrawal et al. — &lt;em>Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve&lt;/em> (OSDI 2024).&lt;/li>
&lt;li>NVIDIA — &lt;em>H100 Tensor Core GPU Architecture Whitepaper&lt;/em> (HBM3 memory, bandwidth, sustained FLOPs).&lt;/li>
&lt;li>vLLM project — &lt;code>vllm bench serve&lt;/code> reference (benchmarking CLI included in the repo).&lt;/li>
&lt;li>NVIDIA — &lt;code>genai-perf&lt;/code> (official tool for benchmarking LLM services).&lt;/li>
&lt;/ul></description></item></channel></rss>