chore(bench): support block-size and vllm bench load overrides#80
Merged
Conversation
- thread block-size through benchmark prepare, service startup, and load phases - pass custom block size to vLLM, LMCache, and DaseR runtime config - add regression coverage for block-size propagation and manifests
- add vllm-bench load-generator mode with synthetic random sizing - reject daser-chunk for OpenAI-compatible vLLM bench traffic - document vllm bench parameters and add regression coverage
- replace legacy backend aliases with canonical benchmark rows - support comma-separated backend subsets - update vllm-bench docs and tests for explicit row selection
- save detailed vllm bench outputs for cold and warm phases - compare cold and warm generated text in vllm-bench mode - include vllm-bench correctness in final summaries
- capture backend metric deltas around vllm-bench phases - use token-level backend hit rates in benchmark summaries - document cache hit rate reporting for vllm-bench
- Batch rolling prefix key generation for prefix lookup and store allocation. - Defer cold KV stores until request completion so vLLM blocks stay valid while reducing prefill interference. - Group L1-only store metadata updates and avoid foreground staging synchronization. - Cover deferred store lifecycle and L1 grouped store behavior with tests.
Owner
Author
|
Update pushed: What changed:
Validation:
Current perf finding:
|
- Lazily create scheduler pending async-save state for mixin probes that bypass connector initialization. - Clear pending async-save markers when preempted scheduler state is dropped.
- Validate benchmark numeric arguments before creating run directories. - Mark vLLM bench correctness unavailable when detailed outputs are absent and count length mismatches. - Release deferred worker saves when no store batch can be staged. - Move synthetic request ID parsing to a shared connector helper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--block-sizeoverride and thread it through prepare/load, service startup, vLLM, LMCache, and DaseR runtime config.run_bench.py --backendto canonical rows only:all,baseline,lmcache,daser-prefix, anddaser-chunk; comma-separated subsets such asbaseline,lmcache,daser-prefixare supported.--load-generator vllm-benchfor synthetic OpenAI-compatiblevllm bench servetraffic with controllable input/output length, request rate, concurrency, seed, prefix length, and random range ratio.cold_warm_exact_match_accuracyin the final summary.backend_server_cache_hit_ratein the same summary field used by the internal loader.vllm-benchselections that includedaser-chunkbecause chunk mode uses DaseR-specific endpoints.Motivation
The IMDB comparison requested with block size 128 could not be represented correctly before this change: vLLM block size, LMCache chunk size, DaseR runtime block tokens, prompt alignment, and capacity sizing were still tied to the default 16-token block in different places. That made block-size-specific benchmark results ambiguous and potentially inconsistent across backends.
We also needed a benchmark path that can drive OpenAI-compatible backends with exact synthetic input lengths.
vllm bench servecovers baseline, LMCache, and DaseR prefix through/v1/completions; DaseR chunk remains on the internal loader because it depends on/documentsand/infer.Cache-hit reporting now uses token-level backend counters for the comparison summary: DaseR uses
daser_cache_matched_tokens_total / daser_cache_requested_tokens_total; LMCache uses MP server token counters when available and falls back to status prefetch token counters. Request-level and external-prefix counters remain in raw metrics for diagnostics.Test plan
PYTHONHASHSEED=0 pytest -q -m "not integration" --ignore=tests/integration --ignore=tests/connector/test_daser_connector.py --ignore=tests/connector/test_gds_transfer.py tests/passespre-commit run --all-filespassesruff checkandruff format, and focused checks below passed.Validation commands:
source /data/zwt/vllm/bin/activate && python -m pytest tests/test_config.py tests/unit/test_benchmark_unified_utils.py -q->87 passed in 11.10ssource /data/zwt/vllm/bin/activate && ruff check benchmarks/run_bench.py benchmarks/bench_load.py benchmarks/utils/loadgen.py tests/unit/test_benchmark_unified_utils.py->All checks passed!source /data/zwt/vllm/bin/activate && ruff format --check benchmarks/run_bench.py benchmarks/bench_load.py benchmarks/utils/loadgen.py tests/unit/test_benchmark_unified_utils.py->4 files already formattedgit diff --checksource /data/zwt/vllm/bin/activate && python benchmarks/run_bench.py --helpconfirmed backend help now shows--backend {all,baseline,lmcache,daser-prefix,daser-chunk}[,...].source /data/zwt/vllm/bin/activate && python - <<'PY' ...confirmed--backend daser-chunk --load-generator vllm-benchraisesValueErrorbefore service startup.Benchmark runs:
--block-size 128,--gen-max-tokens 1,--max-inflight 16, GPU 2, L1-only no-evict mode.block_size=128,num_samples=2000,total_prompt_tokens=1008272, andtotal_blocks=7549.--backend baseline,lmcache,daser-prefix --load-generator vllm-bench --bench-num-prompts 200 --bench-input-len 8192 --bench-output-len 1 --bench-max-concurrency 16 --bench-request-rate inf --block-size 128, GPU 2.Checklist
pre-commit run --all-filespasses