Skip to content

perf(transfer): batch io_uring l2 reads#62

Open
GentleCold wants to merge 1 commit into
masterfrom
perf/long-prefill-direct
Open

perf(transfer): batch io_uring l2 reads#62
GentleCold wants to merge 1 commit into
masterfrom
perf/long-prefill-direct

Conversation

@GentleCold

@GentleCold GentleCold commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove the earlier direct KV-cache load bypass and high-memory staging changes from the effective PR diff.
  • Keep the normal staging-based load path and fixed L1 memory budget.
  • Batch multiple positioned io_uring L2 reads through the existing rings/workers so grouped L2 misses use fewer executor tasks and fewer io_uring_enter calls.

Root Cause

The 200-prompt multi_news long-prefill workload is about 72.68 GiB, while the DaseR L1 pinned-memory tier is fixed at about 64 GiB. Warm runs therefore still reread many KV blocks from L2 after L1 churn. Prefix-hash lookup and staging GPU-to-GPU copy are not the dominant cost in the current traces; the dominant warm cost is large batches of L2 misses under io_uring/O_DIRECT.

This patch improves the constant factor for that L2 path without adding memory, changing replacement policy, bypassing staging, or changing benchmark behavior. It does not make DaseR beat LMCache on this parameter set because LMCache is configured with enough CPU memory for the whole workload.

What This Does Not Do

  • Does not add bounded staging, a spill cache, or another long-lived memory tier.
  • Does not increase staging memory caps.
  • Does not bypass GPU staging or write directly into the final cross-layer KV cache.
  • Does not modify benchmark logic.
  • Does not modify vLLM or LMCache.

Validation

  • source /data/zwt/vllm/bin/activate && ruff check daser/transfer/iouring/native.py daser/transfer/iouring/layer.py tests/transfer/test_tiered_iouring_transfer.py
    • All checks passed!
  • source /data/zwt/vllm/bin/activate && ruff format --check daser/transfer/iouring/native.py daser/transfer/iouring/layer.py tests/transfer/test_tiered_iouring_transfer.py
    • 3 files already formatted
  • source /data/zwt/vllm/bin/activate && pytest -q tests/transfer/test_tiered_iouring_transfer.py
    • 18 passed in 1.69s
  • source /data/zwt/vllm/bin/activate && 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/
    • 177 passed in 5.94s

Benchmark

Command used the issue parameters: multi_news, 200 prompts, GPU 2, --gpu-util 0.90, --max-num-seqs 64, comparison mode iouring-mem-vs-lmcache-local-ssd-mem.

Results written to /data/zwt/daser_bench/pr62-longbench-multinews-n200-gpu09-batched-iouring.json.

Metric DaseR LMCache
cold elapsed 23.74 s 55.59 s
warm elapsed 100.41 s 2.80 s
cold prompt tok/s 22,356 9,547
warm prompt tok/s 5,286 189,463
exact mismatches 0 / 200 0 / 200
warm tok/s ratio 0.03x 1.00x

Compared with the after-revert baseline (DaseR warm 133.53s), batching improves warm time to 100.41s, but the remaining L2 rereads still dominate.

@GentleCold
GentleCold marked this pull request as ready for review May 29, 2026 18:29
@GentleCold
GentleCold force-pushed the perf/long-prefill-direct branch from 072c3af to 5b591ee Compare May 29, 2026 19:16
@GentleCold GentleCold changed the title perf(connector): optimize long prefill warm loads perf(transfer): batch io_uring l2 reads May 29, 2026
- add batched positioned read submissions to the native io_uring wrapper

- group fixed-memory L2 miss reloads across existing io_uring workers

- cover batched native reads and grouped L2 miss batching
@GentleCold
GentleCold force-pushed the perf/long-prefill-direct branch from 5b591ee to 8415d87 Compare May 30, 2026 05:05
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