vllm - ✅(Solved) Fix [Bug]: First request after startup is unexpectedly slow with Qwen/Qwen3.5-27B-FP8 [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#39163Fetched 2026-04-08 03:01:40
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
renamed ×2cross-referenced ×1labeled ×1

Error Message

Almost all of the one-time delay appears to be in the first request's prefill path, not queueing.

Root Cause

This does not look like normal startup spillover because:

Fix Action

Fix / Workaround

============================== CPU Info

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 64 On-line CPU(s) list: 0-63 Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) w7-3565X CPU family: 6 Model: 143 Thread(s) per core: 2 Core(s) per socket: 32 Socket(s): 1 Stepping: 8 CPU(s) scaling MHz: 68% CPU max MHz: 2500.0000 CPU min MHz: 800.0000 BogoMIPS: 4992.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities ibpb_exit_to_user Virtualization: VT-x L1d cache: 1.5 MiB (32 instances) L1i cache: 1 MiB (32 instances) L2 cache: 64 MiB (32 instances) L3 cache: 82.5 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-63 Vulnerability Gather data sampling: Not affected Vulnerability Indirect target selection: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S Vulnerability Srbds: Not affected Vulnerability Tsa: Not affected Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

As a workaround, I can send one synthetic warmup request right after startup. That warmup request itself takes about 44.114 s, and then user-facing requests are normal.

PR fix notes

PR #39169: fix(gdn): Align prefill warmup with real prefill path

Description (problem / solution / changelog)

Purpose

Fixes #39163 by aligning GDN prefill warmup with the real prefill path.

Real GDN prefills build q/k/v/g/beta via fused_post_conv_prep and call chunk_gated_delta_rule(..., use_qk_l2norm_in_kernel=False). The previous warmup path did not mirror that contract, which could leave first-request work deferred to the first real prefill. This PR updates the warmup path and adds a regression test.

Duplicate-work check:

  • Ran gh issue view 39163 --repo vllm-project/vllm --comments
  • Ran gh pr list --repo vllm-project/vllm --state open --search '39163 in:body'
  • Ran gh pr list --repo vllm-project/vllm --state open --search 'GDN prefill warmup first request Qwen3.5 Blackwell'
  • I did not find an open PR already addressing this fix

AI assistance:

  • This PR was prepared with AI assistance. The submitting human reviewed the changed lines and is responsible for the change end-to-end.

Test Plan

python -m compileall vllm/model_executor/layers/mamba/gdn_linear_attn.py tests/model_executor/test_gdn_linear_attn.py
.venv/bin/python -m pytest --noconftest tests/model_executor/test_gdn_linear_attn.py -v
.venv/bin/pre-commit run --files vllm/model_executor/layers/mamba/gdn_linear_attn.py tests/model_executor/test_gdn_linear_attn.py

Test Result

compileall passed.

Targeted pytest:

1 passed

Changed-file pre-commit:

ruff check Passed
ruff format Passed
typos Passed
mypy-local Passed
all remaining relevant file checks Passed

Notes:

  • I did not reproduce the original Blackwell/Qwen3.5 issue end-to-end on this machine because the environment does not expose the target GPU stack.
  • pre-commit run --all-files still has unrelated repo-baseline/local-environment issues on this machine, but the checks for the files changed in this PR pass.

<details> <summary> Essential Elements of an Effective PR Description Checklist </summary>
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.
</details>

Changed files

  • vllm/model_executor/layers/mamba/gdn_linear_attn.py (modified, +26/-12)

Code Example

Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 24.04.3 LTS (x86_64)
GCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : N/A
Is debug build               : N/A
CUDA used to build PyTorch   : N/A
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.13 (main, Mar 24 2026, 22:49:22) [Clang 22.1.1 ] (64-bit runtime)
Python platform              : Linux-6.8.0-107-generic-x86_64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : N/A
CUDA runtime version         : Could not collect
CUDA_MODULE_LOADING set to   : N/A
GPU models and configuration :
GPU 0: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
GPU 1: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
GPU 2: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
GPU 3: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition

Nvidia driver version        : 580.95.05
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : N/A

==============================
          CPU Info
==============================
Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           46 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  64
On-line CPU(s) list:                     0-63
Vendor ID:                               GenuineIntel
Model name:                              Intel(R) Xeon(R) w7-3565X
CPU family:                              6
Model:                                   143
Thread(s) per core:                      2
Core(s) per socket:                      32
Socket(s):                               1
Stepping:                                8
CPU(s) scaling MHz:                      68%
CPU max MHz:                             2500.0000
CPU min MHz:                             800.0000
BogoMIPS:                                4992.00
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities ibpb_exit_to_user
Virtualization:                          VT-x
L1d cache:                               1.5 MiB (32 instances)
L1i cache:                               1 MiB (32 instances)
L2 cache:                                64 MiB (32 instances)
L3 cache:                                82.5 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-63
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

==============================
Versions of relevant libraries
==============================
[pip3] No relevant packages
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : N/A (dev)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    GPU2    GPU3    CPU Affinity    NUMA Affinity    GPU NUMA ID
GPU0     X      NODE    NODE    NODE    0-63            0                N/A
GPU1    NODE     X      NODE    NODE    0-63            0                N/A
GPU2    NODE    NODE     X      NODE    0-63            0                N/A
GPU3    NODE    NODE    NODE     X      0-63            0                N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

==============================
     Environment Variables
==============================

---

docker run --rm --gpus '"device=0"' \
  -p 8002:8000 \
  -e VLLM_LOGGING_LEVEL=INFO \
  -e VLLM_NO_USAGE_STATS=1 \
  vllm/vllm-openai:v0.19.0-cu130 \
  vllm serve Qwen/Qwen3.5-27B-FP8 \
    --served-model-name Qwen3.5-27B-FP8 \
    --tensor-parallel-size 1 \
    --trust-remote-code \
    --gpu-memory-utilization 0.95 \
    --max-model-len 128000 \
    --reasoning-parser qwen3 \
    --enable-prefix-caching \
    --mm-encoder-tp-mode data \
    --mm-processor-cache-type shm \
    --limit-mm-per-prompt '{"image": 8, "video": 0}' \
    --enable-auto-tool-choice \
    --tool-call-parser qwen3_coder

---

endpoint=http://HOST:8002
payload='{
  "model": "Qwen3.5-27B-FP8",
  "messages": [{"role": "user", "content": "1+1をひとことで答えて。"}],
  "max_tokens": 32,
  "stream": true,
  "extra_body": {
    "chat_template_kwargs": {
      "enable_thinking": false
    }
  }
}'

curl -N -o /dev/null -sS -w 'starttransfer=%{time_starttransfer} total=%{time_total}\n' \
  -H 'Content-Type: application/json' \
  -d "$payload" \
  "$endpoint/v1/chat/completions"

curl -N -o /dev/null -sS -w 'starttransfer=%{time_starttransfer} total=%{time_total}\n' \
  -H 'Content-Type: application/json' \
  -d "$payload" \
  "$endpoint/v1/chat/completions"
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 24.04.3 LTS (x86_64)
GCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : N/A
Is debug build               : N/A
CUDA used to build PyTorch   : N/A
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.13 (main, Mar 24 2026, 22:49:22) [Clang 22.1.1 ] (64-bit runtime)
Python platform              : Linux-6.8.0-107-generic-x86_64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : N/A
CUDA runtime version         : Could not collect
CUDA_MODULE_LOADING set to   : N/A
GPU models and configuration :
GPU 0: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
GPU 1: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
GPU 2: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
GPU 3: NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition

Nvidia driver version        : 580.95.05
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : N/A

==============================
          CPU Info
==============================
Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           46 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  64
On-line CPU(s) list:                     0-63
Vendor ID:                               GenuineIntel
Model name:                              Intel(R) Xeon(R) w7-3565X
CPU family:                              6
Model:                                   143
Thread(s) per core:                      2
Core(s) per socket:                      32
Socket(s):                               1
Stepping:                                8
CPU(s) scaling MHz:                      68%
CPU max MHz:                             2500.0000
CPU min MHz:                             800.0000
BogoMIPS:                                4992.00
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities ibpb_exit_to_user
Virtualization:                          VT-x
L1d cache:                               1.5 MiB (32 instances)
L1i cache:                               1 MiB (32 instances)
L2 cache:                                64 MiB (32 instances)
L3 cache:                                82.5 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-63
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

==============================
Versions of relevant libraries
==============================
[pip3] No relevant packages
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : N/A (dev)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    GPU2    GPU3    CPU Affinity    NUMA Affinity    GPU NUMA ID
GPU0     X      NODE    NODE    NODE    0-63            0                N/A
GPU1    NODE     X      NODE    NODE    0-63            0                N/A
GPU2    NODE    NODE     X      NODE    0-63            0                N/A
GPU3    NODE    NODE    NODE     X      0-63            0                N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

==============================
     Environment Variables
==============================
</details>

🐛 Describe the bug

The first request after healthy startup has TTFT around 43 s, while the second and later requests are normal.

I reproduced this with vllm/vllm-openai:v0.19.0-cu130 serving Qwen/Qwen3.5-27B-FP8 on a single NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition GPU with driver 580.95.05.

This does not look like normal startup spillover because:

  • /health is already 200 before the first request
  • the engine is awake
  • prefix_cache_hits_total=0
  • queue time is effectively zero
  • the delay is almost entirely first-request prefill time

How to reproduce?

Start the server like this:

The arguments below are adapted from the official Qwen3.5 recipe to match this single-GPU reproduction: https://docs.vllm.ai/projects/recipes/en/latest/Qwen/Qwen3.5.html

docker run --rm --gpus '"device=0"' \
  -p 8002:8000 \
  -e VLLM_LOGGING_LEVEL=INFO \
  -e VLLM_NO_USAGE_STATS=1 \
  vllm/vllm-openai:v0.19.0-cu130 \
  vllm serve Qwen/Qwen3.5-27B-FP8 \
    --served-model-name Qwen3.5-27B-FP8 \
    --tensor-parallel-size 1 \
    --trust-remote-code \
    --gpu-memory-utilization 0.95 \
    --max-model-len 128000 \
    --reasoning-parser qwen3 \
    --enable-prefix-caching \
    --mm-encoder-tp-mode data \
    --mm-processor-cache-type shm \
    --limit-mm-per-prompt '{"image": 8, "video": 0}' \
    --enable-auto-tool-choice \
    --tool-call-parser qwen3_coder

Wait until http://HOST:8002/health returns 200, then send the same short streaming request twice:

endpoint=http://HOST:8002
payload='{
  "model": "Qwen3.5-27B-FP8",
  "messages": [{"role": "user", "content": "1+1をひとことで答えて。"}],
  "max_tokens": 32,
  "stream": true,
  "extra_body": {
    "chat_template_kwargs": {
      "enable_thinking": false
    }
  }
}'

curl -N -o /dev/null -sS -w 'starttransfer=%{time_starttransfer} total=%{time_total}\n' \
  -H 'Content-Type: application/json' \
  -d "$payload" \
  "$endpoint/v1/chat/completions"

curl -N -o /dev/null -sS -w 'starttransfer=%{time_starttransfer} total=%{time_total}\n' \
  -H 'Content-Type: application/json' \
  -d "$payload" \
  "$endpoint/v1/chat/completions"

Observed from a clean reproduction tenant:

  • first request: starttransfer=0.016977 total=43.449701
  • second request: starttransfer=0.004942 total=0.095591
  • third request with a different prompt: starttransfer=0.006630 total=0.796733
  • cumulative metrics after the third request:
    • time_to_first_token_seconds_sum=43.536531925201416
    • e2e_request_latency_seconds_sum=44.33244299888611
    • request_prefill_time_seconds_sum=43.5066136789992
    • prefix_cache_hits_total=0.0

Observed behavior

Almost all of the one-time delay appears to be in the first request's prefill path, not queueing.

Expected behavior

Once the server is healthy, the first request should be in the same rough TTFT range as later requests, not about 43 seconds slower.

Additional context

As a workaround, I can send one synthetic warmup request right after startup. That warmup request itself takes about 44.114 s, and then user-facing requests are normal.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

The first request after a healthy startup has a significantly higher Time To First Token (TTFT) compared to subsequent requests, suggesting a potential issue with the server's initialization or warm-up process.

Guidance

  • The issue seems to be related to the server's warm-up process, as sending a synthetic warmup request after startup resolves the issue.
  • The high TTFT for the first request is mostly due to the prefill path, not queueing, indicating a potential problem with the server's initialization or caching mechanism.
  • To mitigate this issue, consider sending a warmup request after startup, as described in the additional context section.
  • Investigate the server's configuration and caching settings to identify potential causes for the slow prefill path.

Example

No specific code example is provided, but the workaround mentioned in the additional context section can be used as a temporary solution:

# Send a synthetic warmup request after startup
curl -N -o /dev/null -sS -w 'starttransfer=%{time_starttransfer} total=%{time_total}\n' \
  -H 'Content-Type: application/json' \
  -d "$payload" \
  "$endpoint/v1/chat/completions"

Notes

The root cause of the issue is not immediately clear, and further investigation is needed to determine the exact reason for the slow prefill path. The workaround provided may not be suitable for all use cases, and a more permanent solution should be explored.

Recommendation

Apply the workaround by sending a synthetic warmup request after startup, as it seems to resolve the issue temporarily. However, it is recommended to investigate the server's configuration and caching settings to identify the root cause and implement a more permanent solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Once the server is healthy, the first request should be in the same rough TTFT range as later requests, not about 43 seconds slower.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - ✅(Solved) Fix [Bug]: First request after startup is unexpectedly slow with Qwen/Qwen3.5-27B-FP8 [1 pull requests, 1 participants]