Scenario

CUDA graphs turned off to start faster

L2WorkingIncident20 minDebuggingML breadthDesign review

RolesInference Engineering

Engine
SGLang 0.5.22
Model
Qwen/Qwen3-30B-A3B-Instruct-2507
Hardware
one GB10 with 128 GB of unified memory

Situation

A team runs Qwen/Qwen3-30B-A3B-Instruct-2507 on GB10 nodes behind an autoscaler. New pods take more than six minutes to become ready, so the autoscaler starts extra pods during every ramp and the bill grows. An engineer reads the startup log, sees that it captures CUDA graphs twice, and proposes to disable both graph backends: "capture is pure startup cost, and the prefill capture alone takes half a minute". A reviewer blocks the change: "graphs are what make decode fast, you will double the time per token".

Both have read the same log and neither has measured. The pod has been restarted with each setting, and the kit output for both servers is on the shared drive.

Questions

  1. From the startup timings line, where do the six minutes go, and how much of that is graph capture?
  2. What does a CUDA graph remove from a decode step, and on which model and GPU is that removal worth the most?
  3. Read the two kit runs at one user. What did graphs change in the typical token gap, and what in the worst one?
  4. The three-seed table shows a GB10 result that differs from the L4 result in the manual. Why would two cards disagree about the same feature?
  5. Does disabling graphs fix the autoscaler? What does?
  6. When would the reviewer be right? Name the model shape and the load.

Commit to a cause after each listing. Write it down before you read the next one.

Evidence

1/7

the server command with both graph backends disabled

The two flags at the end are the change.

evidence/the-change.txt
sglang serve --model-path Qwen/Qwen3-30B-A3B-Instruct-2507 --host 127.0.0.1 --port 30000 --enable-cache-report --enable-metrics --mem-fraction-static 0.7 --cuda-graph-backend-decode disabled --cuda-graph-backend-prefill disabled

Source: manuals/sglang-101/capture/gpu/out-gb10/server-no-cuda-graph.command.txt

2/7

the end of startup on the default server, with the timings line

Read the decode capture line, the pool size, and the startup timings with the two capture times inside them.

evidence/startup-with-graphs.txt
[2026-10-17 14:19:12] Capture target decode CUDA graph end. bs=[1, 2, 4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256], elapsed=4.61 s, mem usage=1.73 GB, avail mem=26.95 GB.
[2026-10-17 14:19:12] max_total_num_tokens=227243, chunked_prefill_size=8192, max_prefill_tokens=16384, max_running_requests=2048, context_len=262144, available_gpu_mem=26.95 GB
[2026-10-17 14:19:12] Init Unified Radix Cache. Components: (<ComponentType.FULL: 0>,). Tree Core: RustUnifiedTreeCore
[2026-10-17 14:19:12] Tree cache initialized: source=default impl=UnifiedRadixCache hybrid_swa=False hybrid_ssm=False hicache_attached=False
[2026-10-17 14:19:12] Engine startup timings (s): load_weight=323.61, kv_cache_allocation=2.09, scheduler_e2e=369.03, cuda_graph={prefill=35.06, decode=4.61, target_verify=0.00, draft_prefill=0.00, draft_decode=0.00, draft_extend=0.00}, tokenizer_e2e=373.52

Source: manuals/sglang-101/capture/gpu/out-gb10/server-default.log, lines 28-32

3/7

the startup phases of the server without graphs

Compare scheduler_e2e and tokenizer_e2e with the default server.

evidence/startup-without-graphs.txt
[2026-10-17 14:36:42] Disable prefill CUDA graph because cuda_graph_config resolved prefill.backend='disabled' (e.g. via --cuda-graph-backend-prefill=disabled or auto-disable rules).
[2026-10-17 14:36:42] max_total_num_tokens=258017, chunked_prefill_size=8192, max_prefill_tokens=16384, max_running_requests=2048, context_len=262144, available_gpu_mem=31.20 GB
[2026-10-17 14:36:42] Init Unified Radix Cache. Components: (<ComponentType.FULL: 0>,). Tree Core: RustUnifiedTreeCore
[2026-10-17 14:36:42] Tree cache initialized: source=default impl=UnifiedRadixCache hybrid_swa=False hybrid_ssm=False hicache_attached=False
[2026-10-17 14:36:44] Engine startup timings (s): load_weight=322.24, kv_cache_allocation=2.07, scheduler_e2e=341.39, cuda_graph={prefill=0.00, decode=0.00, target_verify=0.00, draft_prefill=0.00, draft_decode=0.00, draft_extend=0.00}, tokenizer_e2e=346.34

Source: manuals/sglang-101/capture/gpu/out-gb10/server-no-cuda-graph.log, lines 21-25

4/7

median TPOT and output with and without graphs, three seeds, 1 to 64 users

Read the two TPOT columns row by row, then the reading under the table.

evidence/decode-on-the-gb10.txt
**We measured** two servers with three seeds at each concurrency from 1 to 64. The default server replayed a decode graph on every decode batch, and its log says `cuda graph: True`. The server with both graph backends set to `disabled` logged `cuda graph: False`. The results were almost the same:

| Concurrency | Median TPOT with graphs | Median TPOT without | Output tok/s with graphs | Output tok/s without |
|---|---|---|---|---|
| 1 | 32.52 ms | 33.09 ms | 29.14 | 28.72 |
| 8 | 102.21 ms | 104.77 ms | 74.11 | 73.46 |
| 64 | 254.06 ms | 253.77 ms | 235.38 | 235.79 |

The two lines lie on top of each other in [figure 5.1c](#fig-5-1c). The graphs still cost startup time and memory. The decode capture took 4.61 s and 1.73 GB, and the prefill capture took 35.06 s and 2.14 GB.

Our reading of this result: one decode step of this model takes about 32 ms at batch 1. The launch time that a graph removes is small next to that step. Each step reads the weights of the experts that its tokens chose, and memory bandwidth sets the time.

Source: manuals/sglang-101/sections/4-1-forwardmode-and-cuda-graphs.md, lines 95-105

5/7

one kit run at one user with graphs on

Read the median TPOT and the P99 ITL.

evidence/one-user-with-graphs.txt
---------------Time to First Token----------------
Mean TTFT (ms):                          209.92    
Median TTFT (ms):                        241.36    
P90 TTFT (ms):                           268.58    
P95 TTFT (ms):                           278.05    
P99 TTFT (ms):                           289.92    
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          30.82     
Median TPOT (ms):                        30.84     
P90 TPOT (ms):                           30.92     
P95 TPOT (ms):                           31.05     
P99 TPOT (ms):                           31.29     
---------------Inter-Token Latency----------------
Mean ITL (ms):                           30.82     
Median ITL (ms):                         30.79     
P90 ITL (ms):                            31.45     
P95 ITL (ms):                            31.67     
P99 ITL (ms):                            32.21     

Source: manuals/sglang-101/capture/gpu/out-gb10/bench-random-c1.txt, lines 34-51

6/7

the same kit run at one user with graphs off

Compare the median TPOT and the P99 ITL with the run before.

evidence/one-user-without-graphs.txt
---------------Time to First Token----------------
Mean TTFT (ms):                          263.80    
Median TTFT (ms):                        291.11    
P90 TTFT (ms):                           354.70    
P95 TTFT (ms):                           373.75    
P99 TTFT (ms):                           413.63    
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          31.29     
Median TPOT (ms):                        31.29     
P90 TPOT (ms):                           31.37     
P95 TPOT (ms):                           31.46     
P99 TPOT (ms):                           31.60     
---------------Inter-Token Latency----------------
Mean ITL (ms):                           31.29     
Median ITL (ms):                         31.40     
P90 ITL (ms):                            32.73     
P95 ITL (ms):                            33.31     
P99 ITL (ms):                            41.72     

Source: manuals/sglang-101/capture/gpu/out-gb10/no-cuda-graph-bench-random-c1.txt, lines 34-51

7/7

the position of the manual on graphs, memory and startup

Read the last paragraph.

evidence/the-position.txt
## Our position

Keep CUDA graphs on, and size them to your traffic. The default `max_bs` suits moderate concurrency. If your benchmark or your production peak runs more requests than that, set `--cuda-graph-max-bs-decode` and `--max-running-requests` to your target before you measure. SemiAnalysis InferenceX recipes {{field InferenceX 2026-05}} derive both values from the concurrency they test.

Do not expect graphs to make a slow decode fast on every machine. On the GB10, one decode step of a mixture-of-experts model takes tens of milliseconds, and graphs changed it by 3 percent or less. On the L4, with a dense 8B model, they saved about 1 percent. The worst token gap was shorter without them at 16 and 32 users. Measure the median and the tail, with and without graphs, before you blame the launch path.

Do not turn graphs off to fix memory. If capture runs out of memory, lower `--cuda-graph-max-bs-decode` or `--mem-fraction-static`. A server without decode graphs pays launch time on every token for every user.

Source: manuals/sglang-101/sections/4-1-forwardmode-and-cuda-graphs.md, lines 143-149

The answer

Show the walkthrough
  1. Read the timings line of the default server. It reads load_weight=323.61, kv_cache_allocation=2.09, scheduler_e2e=369.03, cuda_graph={prefill=35.06, decode=4.61, ...} and tokenizer_e2e=373.52. The weight load is 323.61 s of a 373.52 s start. The prefill capture took 35.06 s and the decode capture 4.61 s. The captures also cost memory: the section gives 2.14 GB for prefill and 1.73 GB for decode.
  2. Read the startup without graphs. The server logged that the prefill graph was disabled because the config resolved the backend to disabled, allocated a pool of 258017 tokens against 227243 with graphs, and finished with scheduler_e2e=341.39 and tokenizer_e2e=346.34, with every graph field at 0.00. Its weight load was 322.24 s. So the change saved the capture time and bought a larger pool, and the start still took 346.34 s, because 322.24 s of weight load sit inside it.
  3. Know what a graph saves. A decode step is hundreds of small kernel launches, one token per request each. A graph records them once and replays them with one CPU call. The saving is launch time, a fixed cost per step that matters when the step itself is short: a small dense model on a fast GPU at batch 1 is the case the mechanism was built for.
  4. Read the three-seed table. On this mixture-of-experts model on the GB10, the median TPOT was 32.52 ms with graphs against 33.09 without at one user, 102.21 against 104.77 at 8 users, and 254.06 against 253.77 at 64. Output was 29.14 against 28.72, 74.11 against 73.46, and 235.38 against 235.79. The manual's reading: a step of this model takes about 32 ms at batch 1, memory bandwidth sets that time, and the launch time a graph removes is small next to it.
  5. Read the kit's single runs. At one user with graphs: a median TPOT of 30.84 ms, a median ITL of 30.79 and a P99 ITL of 32.21. Without graphs: 31.29, 31.40 and 41.72. The medians agree with the three-seed table. The P99 ITL moved more, from 32.21 to 41.72 ms, but these are single runs with no clock record, so the tail is a lead to measure, not a result. At 8 users the kit read 97.30 against 100.03 ms. Do not use the first-token column of these runs for the comparison, because the kit never flushed the cache between runs.
  6. Read the position. Keep graphs on and size them to your traffic. Do not turn them off to fix memory; lower --cuda-graph-max-bs-decode or --mem-fraction-static instead. On the GB10 graphs changed decode by 3 percent or less, and on the L4 with a dense 8B model they saved about 1 percent of each step. The old flag --disable-cuda-graph still works at v0.5.22 and is deprecated in favor of the two per-phase flags in the command.
Show the resolution

Neither engineer was right about the size. Disabling the graphs saved the capture, 35.06 s for prefill and 4.61 s for decode, and the start still took 346.34 s instead of 373.52, because 322.24 s of weight load dominate the start. On the decode side the reviewer's fear did not materialize on this model and card: the median time per token changed by 3 percent or less from 1 to 64 users, and the output stayed within the seed spread.

So the change does not solve the ramp, and the weight load is the problem to work on. Keep the weights on a local drive, keep the server running between ramps, mount the kernel caches and the model cache on volumes that survive the pod, and set the readiness probe and the scale-up policy from the measured 373.52 s, as the operating page describes. Keep the graphs on, because a server without decode graphs pays launch time on every token for every user, and that cost shows on smaller dense models where the step is short. If the team wants the memory back, the lever is --cuda-graph-max-bs-decode, not the capture itself. Before any change of this kind, measure the pair with a clock record and three seeds, as the table did, and read the tail as well as the median.

Show the wrong turns
  • “Capture is pure startup cost, so remove it.”

    It is 35.06 plus 4.61 s of a start that spends 323.61 s loading weights. Removing it moved the start from 373.52 to 346.34 s and left the ramp problem in place.

  • “Without graphs the time per token doubles.”

    On this mixture-of-experts model on the GB10, the median TPOT moved from 32.52 to 33.09 ms at one user and from 254.06 to 253.77 at 64. The step is bound by memory bandwidth, not by launches.

  • “The GB10 result settles it for every model.”

    On the L4 with a dense 8B model the graphs saved about 1 percent of each step, and on a small model on a fast GPU the launch share is larger still. The saving is a property of the step length.

  • “Turn graphs off to get the KV pool back.”

    The pool grew from 227243 to 258017 tokens, but the manual says to lower the graph batch size or the memory fraction instead, so that decode keeps its graphs.

  • “Read the kit's first-token column to settle the tail.”

    The kit never flushed the cache between runs, so the first token is not comparable. The P99 ITL gap at one user, 32.21 against 41.72 ms, needs a run with seeds and a clock record first.

Show the general rule

Read where the time goes before you remove a phase. A startup, like a decode step, is a sum of parts of very different sizes, and the part that is easy to remove is rarely the part that dominates. Measure the cost and the gain of a feature on your own model and GPU, at your load, with seeds and a clock record, because a saving that is real on one step length is noise on another.

Taught in

The SGLang manual measures the pair on the GB10 and on the L4 in the CUDA graphs page and breaks a cold start into its phases in the operating page.