Skip to content

bench: B-1b attribution of Dynamo's time-to-first-token gain - #72

Draft
manmohanbrahma wants to merge 1 commit into
mainfrom
bench/b1b-attribution
Draft

manmohanbrahma wants to merge 1 commit into
mainfrom
bench/b1b-attribution

Conversation

@manmohanbrahma

Copy link
Copy Markdown
Collaborator

B-1 measured Dynamo's TTFT up to 40% lower than vLLM's own server (Qwen3-0.6B, chat, 64 users) with the same engine and equal throughput. B-1b finds where that time goes before we claim it.

What changes

  • oif bench --trace: per point, CPU of every server process (bench/proc_sampler.py), py-spy profiles of every Python process (--nonblocking, pinned PYSPY_VERSION=0.4.1), the server's /metrics before and after. bench/attrib.py splits TTFT into engine core (queue + prefill), output path and API layer, and buckets the profiles (tokenize, detokenize, HTTP, JSON, ZMQ, asyncio).
  • New stacks on BENCH_VLLM_IMAGE, only when named in --stacks: vllm-api4 (--api-server-count 4) and vllm-rs (vLLM 0.33.0's own experimental Rust frontend, VLLM_USE_RUST_FRONTEND=1; skipped when the image has no vllm-rs binary).
  • Profile attrib: chat and short prompts, concurrency 1 to 64, 3 repeats.
  • Every server binds 127.0.0.1 (was 0.0.0.0 on the host network); Dynamo's system and TCP request-plane hosts too.
  • Guide 18 section "Where the first-token time goes (B-1b)", TASKS B-1b, docs/MEMORY.md.

Tests

  • New tests/unit/test_bench_attrib.sh (synthetic metrics, CPU samples and a speedscope profile; on Linux a live process-tree sample). Passes on Ubuntu 24.04, with test_bench_report, test_bench_lock, test_rules, test_links and test_exec_bits. shellcheck v0.11.0: info-level only.

Lab check (owner, not run yet)
Two passes on the W7900 (on the bare host while the VMs are off): --profile attrib for timings, then --repeats 1 --trace; the attrib table per point. Draft until then.

oif bench --trace samples CPU per server process, py-spy profiles every Python
process (nonblocking) and snapshots /metrics around each point; bench/attrib.py
splits TTFT into engine core, output path and API layer. New stacks on the same
vLLM image: vllm-api4 (--api-server-count 4) and vllm-rs (vLLM 0.33.0's own Rust
frontend). Profile attrib. Every server now binds 127.0.0.1. Guide 18 section,
unit test test_bench_attrib.sh.

Signed-off-by: Manmohan Brahma <manmohan.brahma@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant