{"slug": "fastpath-agentic-recipe-50-more-agents-at-equal-p90-interactivity-on-sglang", "title": "FastPath Agentic Recipe: 50% more agents at equal P90 interactivity on SGLang", "summary": "Enabling six existing SGLang server flags on stock SGLang raised throughput 11.18% over the same-node stock server at 16 concurrent agents and cut P90 time to first token from 2.53 s to 0.93 s, according to a FastPath measurement published on the SGLang blog. At 24 agents the recipe held the same P90 interactivity as stock at 16 agents — 50% more agents on the same two GPUs and 60% more throughput than the published InferenceX point — reaching 37,995 tokens per second per GPU versus 34,070 published. The recipe adds an FP8 KV cache (fp8_e4m3, growing the pool from 2.10M to 3.96M tokens) and a 50 GB-per-GPU host-DRAM HiCache tier with write_back policy, changing no code, model, image or hardware.", "body_md": "[Blog and announcements](../blog.html)\n\nBlog · Paper\n\n# The FastPath Agentic Recipe: 50% more agents and 60% more throughput at equal P90 interactivity on stock SGLang\n\nCoding agents resend their whole history on every turn. On a public benchmark cell, the server ran out of KV cache and computed the same prompts twice. Six existing SGLang flags fix most of it, with no code change.\n\n**What this is.** A measurement, not a new method. The FP8 KV cache and the host-memory tier are documented SGLang features, and InferenceX already uses them for this model on other accelerators. The H200 cell leaves them off. We turned them on, wrote the pass bars before the first run, and report every number with its limits.\n\n## The result in one paragraph\n\nAt 16 concurrent agents, the top of the published range, the recipe raised throughput by 11.18% over the same-node stock server (range 9.83% to 12.04% over three runs), against a noise bound of 2.47%. P90 time to first token fell from 2.53 s to 0.93 s. P90 interactivity rose by 33%, and P90 end-to-end-normalized interactivity by 53%. Accuracy held on GSM8K, and there were zero request errors. The recipe gives 37,995 tokens per second per GPU, 11.5% above the published InferenceX point (34,070). At 24 agents it keeps the same P90 interactivity as stock at 16 agents: 50% more agents on the same two GPUs, and 60% more throughput than the published point.\n\n## The problem: agents resend their history\n\nA coding agent works in turns. On each turn it sends the model the task, the files it read, the tool output and every earlier answer. In the AgentX traces the median request carries about 91,000 input tokens and asks for about 300 output tokens.\n\nMost of each prompt is the same as on the last turn. SGLang keeps the KV cache of earlier prompts and reuses the longest matching prefix. If the prefix is still in GPU memory when the agent returns, the server computes only the new tokens. If the prefix was evicted, the server computes the full history again. That is the same work done twice. [Technical note 4](../technical-notes.html#tn-4) explains prefix caching.\n\n## What we found on the published recipe\n\nWe ran the published InferenceX recipe on its own image and traces. Our six stock points lie within −1.6% and +2.1% of the published point, so the setup reproduces the baseline. At 16 agents:\n\n- Running requests alone held up to 99% of the KV pool of 2.10 million tokens, so the server evicted the cached prefixes of waiting agents.\n- The prefix-cache hit rate was 89.3%, against a limit of 96.1% for the trace.\n- The server computed about 26 million prompt tokens in one hour, about 16 million more than the trace requires.\n\nThe published InferenceX point shows the same gap: a hit rate of 88.8%.\n\n## The recipe: six flags\n\nThe FastPath Agentic Recipe is the published recipe plus six server flags. It changes no code, model, image or hardware. Two of the six values are already the defaults in SGLang 0.5.23; the recipe sets them so that it does not depend on defaults.\n\n| Table 1.  The six flags. Defaults are those of SGLang 0.5.23. |  |  |  | \n|---|---|---|---|\n| Flag | Recipe value | Default | Effect | \n|---|---|---|---|\n| `--kv-cache-dtype` | `fp8_e4m3` | `auto` (BF16 here) | 1 byte per KV element instead of 2. The pool grows from 2.10M to 3.96M tokens. | \n| `--enable-hierarchical-cache` | on | off | Adds a host-DRAM tier (HiCache). Evicted pages go to DRAM. | \n| `--hicache-size` | 50 (GB per GPU) | 0 | Size of the DRAM tier, set before the runs from container memory. | \n| `--hicache-io-backend` | `kernel` | `kernel` | GPU kernels copy pages between GPU memory and DRAM. | \n| `--hicache-mem-layout` | `page_first` | `page_first` | Each page is contiguous in DRAM, so one page moves in one copy. | \n| `--hicache-write-policy` | `write_back` | `write_through` | A page is written to DRAM only when it leaves the GPU. | \n\n**Table 1.** The six flags. Defaults are those of SGLang 0.5.23.\n\n**Why an FP8 KV cache helps.** The pool size is fixed by memory, not by tokens. At half the bytes per element, the same memory holds about twice the tokens. More agent histories stay resident, and fewer prompts are computed twice.\n\n**Why a host-memory tier helps.** Without it, an evicted page is lost, and a return costs a prefill of the full history. With it, the page goes to host DRAM, and a return costs a copy over PCIe, which is much cheaper than a long prefill.\n\n**What it can cost.** FP8 carries less precision, so output can change, and attention must convert the elements back. The host tier adds copy traffic. So we measured accuracy, time per token and time to first token, not only throughput.\n\n## How we tested it\n\nWe wrote the arms, the load points and the pass rules into the plan and committed them before the first measured run. A 20-minute pilot over six candidate flag sets chose the recipe. Each run then had to pass four bars:\n\n1. At 16 agents, the recipe beats the mean of two stock points on throughput by more than the noise bound.\n2. At 8 and 14 agents, it loses no more throughput than the noise bound.\n3. At 8, 14 and 16 agents, it loses no more P90 interactivity or P90 end-to-end-normalized interactivity than their noise bounds.\n4. Zero request errors, and GSM8K at most 0.5 points below stock on each node.\n\nThe verdict is GO only if all three runs pass. Each point is a one-hour window. [Research note 5](../experiments/measurement.html) describes how we measure.\n\n## Results\n\n| Table 2.  Throughput at 16 agents, tokens per second per GPU. S1 and S2 are the two stock points of a run. Bound: the larger of the 1.0% floor and the S1–S2 spread of the run. |  |  |  |  |  |  | \n|---|---|---|---|---|---|---|\n| Run (node) | S1 | S2 | Recipe | Gain | Bound | Result | \n|---|---|---|---|---|---|---|\n| 1 (A) | 34,376 | 34,803 | 37,989 | +9.83% | 1.23% | Pass | \n| 2 (A) | 33,934 | 34,049 | 38,085 | +12.04% | 1.00% | Pass | \n| 3 (B) | 33,534 | 34,371 | 37,911 | +11.66% | 2.47% | Pass | \n| All | mean 34,178 |  | 37,995 | +11.18% | 2.47% | GO | \n\n**Table 2.** Throughput at 16 agents, tokens per second per GPU. S1 and S2 are the two stock points of a run. Bound: the larger of the 1.0% floor and the S1–S2 spread of the run.\n\n| Table 3.  The numbers at 16 agents. InferenceX: its published point #447792. Stock: mean of six points. Recipe: mean of three points. |  |  |  |  | \n|---|---|---|---|---|\n| 16 agents | InferenceX | Stock | Recipe | Recipe vs stock | \n|---|---|---|---|---|\n| Throughput, tok/s per GPU | 34,070 | 34,178 | 37,995 | +11.2% | \n| Output, tok/s per GPU | 304.2 | 306.2 | 334.7 | +9.3% | \n| Time per token p90, ms | 18.2 | 18.1 | 13.6 | −24.7% | \n| P90 interactivity, tok/s per user | 55.0 | 55.3 | 73.3 | +32.6% | \n| P90 E2E-normalized interactivity | 36.1 | 36.6 | 55.9 | +52.5% | \n| Time to first token p90, s | 2.72 | 2.53 | 0.93 | −63.3% | \n| End-to-end latency p90, s | 27.6 | 26.8 | 20.3 | −24.3% | \n| Prefix-cache hit rate | 88.8% | 89.3% | 95.3% | +6.0 pts | \n| Request errors | 0 | 0 | 0 |  | \n\n**Table 3.** The numbers at 16 agents. InferenceX: its published point #447792. Stock: mean of six points. Recipe: mean of three points.\n\nThe machines differ from those of InferenceX, so we treat the comparison with the published point as a reference. The claim is the same-node comparison in Table 2. At the rental price of our nodes ($5.29 per GPU-hour), the cost per million total tokens falls from $0.0430 to $0.0387, 10.0% lower. Most of those tokens are cached input; output tokens rose by 9.3%.\n\n## The gain follows cache pressure\n\nThe gain appears only when the cache is under pressure. At 8 agents running requests hold at most 43% of the stock pool, and the gain is zero. At 14 agents they hold up to 84%, and the gain is about 5%. At 16 agents they hold up to 99%, and the gain is about 11%. All three runs show the same order.\n\n| Table 4.  Where the prompt tokens went in one hour, means over three runs. Computed: prompt tokens the server had to compute. Required: the same at the trace limit. Excess: computed minus required. |  |  |  |  |  | \n|---|---|---|---|---|---|\n| Agents, arm | Pool, M tokens | Peak active use | Hit rate | Computed, M | Excess, M | \n|---|---|---|---|---|---|\n| 16, stock | 2.10 | 99% | 89.3% | 26.0 | 16.4 | \n| 16, recipe | 3.96 | 48% | 95.3% | 12.7 | 2.5 | \n| 24, recipe | 3.97 | 75% | 95.1% | 19.0 | 5.5 | \n\n**Table 4.** Where the prompt tokens went in one hour, means over three runs. Computed: prompt tokens the server had to compute. Required: the same at the trace limit. Excess: computed minus required.\n\nAt 16 agents the excess fell from 16.4 million to 2.5 million prompt tokens per hour, by 85%, while the server completed 8% more requests. The DRAM tier served only 0.25% of prompt tokens at that load, so almost all cache hits came from the larger FP8 pool in GPU memory. We did not measure how the gain splits between the two features.\n\n## Long prompts gain most\n\nAn eviction hurts the longest histories most, because a miss means a prefill of the full history. Above 128,000 prompt tokens, P90 time to first token fell from 5.65 s to 0.91 s, a factor of 6.2. Below 32,000 tokens it fell from 1.12 s to 0.92 s. With the recipe, P90 time to first token stays between 0.86 s and 1.17 s at every prompt length. The median is below 0.6 s for both arms, so the loss is in the tail: the requests whose history was evicted.\n\n## More agents at the same speed per user\n\nThe recipe also ran at 20 and 24 agents, beyond the published range. At 24 agents it gave 54,476 tokens per second per GPU (mean of three runs) at a P90 interactivity of 55 tokens per second per user. That is the same interactivity as stock and InferenceX at 16 agents (55.3 and 55.0). So the same two GPUs serve 50% more agents at the same P90 speed per user, with 60% more throughput than the published point at 16 agents.\n\nThe cost is a higher median time per token (11.6 ms against 9.7 ms) and a P90 time to first token of 1.20 s to 1.25 s, still half of the 2.53 s of stock at 16 agents. Stock was not run at 24 agents, so this compares the recipe at 24 agents with stock at 16.\n\n## What we are not claiming\n\n- **A new method.** Both features are documented in SGLang. InferenceX uses the same six flags for this model on B200, with FP4 checkpoints. Our contribution is the measurement on the H200 cell.\n- **A split of the gain.** In 20-minute pilot points, FP8 alone gave +2.6%, the host tier alone +5.6% and both +5.2%. Full one-hour ablations were not run.\n- **Unchanged quality on agent tasks.** GSM8K on 100 questions detects only large damage. It does not prove that long-context or agentic output is unchanged with an FP8 KV cache.\n- **Real speculative acceptance.** As InferenceX does, every timing point ran with a fixed MTP acceptance length (`SGLANG_SIMULATE_ACC_LEN=2.32` ), the same in both arms. On GSM8K servers with real acceptance, the FP8 arms accepted about 4% fewer tokens per step. A real-acceptance run on agent traces could show a smaller gain.\n- **A gain at low load.** At 8 agents the gain was +0.22%, +0.17% and −1.74%, and P90 interactivity was 3% to 4% lower in all three runs. That is inside the pre-registered bounds, but the sign is consistent.\n- **An official InferenceX result.** Only InferenceX running the recipe on its own hardware gives one.\n- **A per-watt result.** We did not measure power.\n- **A clean run of the plan.** There were two deviations from the repeat rule: run 3 failed three times in setup before any measured point, and one stock point in run 2 ran out of GPU memory and was run again. The paper gives both in full.\n\n## What comes next\n\n- Submit the recipe to InferenceX, so that it is measured on InferenceX hardware.\n- Propose the H200 settings to the SGLang cookbook.\n- Run one-hour ablations to split the gain between the FP8 cache and the host tier.\n- Run with real speculative acceptance on agent traces, and test quality on long-context and agentic tasks.\n- Release the benchmark kit, the pre-registration and the summary data in a public repository.\n\nThe [full paper](../assets/papers/fastpath-agentic-recipe-v7.pdf) gives every table, the load map from 1 to 24 agents, the cache counters, the threats to validity and the related work.\n\n## References\n\n1. SemiAnalysis. [InferenceX, AgentX agentic result #447792](https://inferencex.semianalysis.com/infx/inference/agentic/447792?g_model=Qwen3.8-Flash-Next&i_seq=agentic-traces&g_rundate=2026-11-09) , Qwen3.8-Flash-Next, 2 × H200, 9 November 2026.\n2. SemiAnalysis. [InferenceX pull request #4272](https://github.com/SemiAnalysisAI/InferenceX/pull/4272) (the TP2 recipe) and[#4888](https://github.com/SemiAnalysisAI/InferenceX/pull/4888) (SGLang 0.5.23 image).\n3. SGLang Team. [HiCache design documentation](https://docs.sglang.io/docs/advanced_features/hicache_design) and server arguments, SGLang v0.5.23.\n4. L. Zheng et al. SGLang: Efficient Execution of Structured Language Model Programs. NeurIPS 2024. [arXiv:2312.07104](https://arxiv.org/abs/2312.07104) .\n\nThe features are SGLang’s and the benchmark is InferenceX’s. The recipe and the measurements are ours. [Write to us](../contact.html) about this work.", "url": "https://wpnews.pro/news/fastpath-agentic-recipe-50-more-agents-at-equal-p90-interactivity-on-sglang", "canonical_source": "https://fastpathlabs.ai/blog/fastpath-agentic-recipe", "published_at": "2026-11-24 20:17:32+00:00", "updated_at": "2026-11-24 20:45:39.783603+00:00", "lang": "en", "topics": ["ai-infrastructure", "large-language-models", "ai-agents", "mlops"], "entities": ["SGLang", "InferenceX", "FastPath", "HiCache", "GSM8K", "AgentX"], "also_reported_by": [], "takeaway": "Enabling fp8_e4m3 KV cache plus a 50 GB-per-GPU hierarchical HiCache tier with write_back policy lifted prefix-cache hit rate toward the 96.1% trace limit and cut P90 time to first token from 2.53 s to 0.93 s at 16 agents.", "recommendation": {"advice": "On SGLang 0.5.23, set --kv-cache-dtype fp8_e4m3 and enable hierarchical cache with --hicache-size 50 and --hicache-write-policy write_back to stop evicting agent prefixes; the source measured 11.18% more throughput at equal P90.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/fastpath-agentic-recipe-50-more-agents-at-equal-p90-interactivity-on-sglang", "markdown": "https://wpnews.pro/news/fastpath-agentic-recipe-50-more-agents-at-equal-p90-interactivity-on-sglang.md", "text": "https://wpnews.pro/news/fastpath-agentic-recipe-50-more-agents-at-equal-p90-interactivity-on-sglang.txt", "jsonld": "https://wpnews.pro/news/fastpath-agentic-recipe-50-more-agents-at-equal-p90-interactivity-on-sglang.jsonld"}}