Skip to content

feat(connector): add tiered io_uring KV prefetch#96

Merged
GentleCold merged 4 commits into
masterfrom
feat/tiered-iouring-prefetch
Jul 18, 2026
Merged

feat(connector): add tiered io_uring KV prefetch#96
GentleCold merged 4 commits into
masterfrom
feat/tiered-iouring-prefetch

Conversation

@GentleCold

@GentleCold GentleCold commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • classify the exact external KV window as l1, mixed, or l2 in the existing lookup IPC
  • atomically lease all-L1 ranges so L1-to-GPU loads can proceed while independent L2-to-L1 prefetches run
  • keep prefetch_max_requests=2 for mixed/L2 requests; all-L1 requests bypass that L2-only bound
  • retain leases through CUDA staging synchronization and block overlapping stores until release
  • propagate TP-safe lease IDs through scheduler, IPC, and worker load batches
  • preserve stale-promotion protection, GDS behavior, suffix stores, and prefetch failure cleanup

Validation

  • default non-integration/non-slow suite: 365 passed, 101 deselected
  • Ruff check and format: passed
  • mypy for all touched production modules: passed
  • git diff --check: passed
  • benchmark stores and per-run scratch: removed after results extraction

200-Request Benchmark

Configuration for all rows: Qwen3-8B, GPU 2, TP1, block size 128, 200 requests, 10,000 input tokens, 1 output token, max-num-seqs/concurrency 16, seed 42, request rate inf, GPU utilization 0.7, eviction-enabled io_uring, DaseR prefix backend. Feature rows use prefetch_max_requests=2; master does not expose that flag.

revision cold TTFT mean / median / P99 (ms) warm TTFT mean / median / P99 (ms) warm hit success cold/warm exact match
master (e559308) 6557.60 / 6665.02 / 7001.04 1336.97 / 1543.18 / 1910.57 99.9893% 200/200 197/200, indices 17, 92, 125
unchanged feature (eaf008d) 6575.00 / 6687.43 / 7022.07 1199.33 / 1384.45 / 1706.05 99.9893% 200/200 197/200, indices 17, 92, 125
this PR with overlap fix 6575.63 / 6720.40 / 7023.73 1157.98 / 1277.36 / 1767.71 99.9893% 200/200 198/200, indices 92, 125

All rows passed DaseR /drain. Warm mean deltas:

  • overlap fix vs unchanged feature: -41.35 ms (-3.45%)
  • overlap fix vs master: -178.99 ms (-13.39%)
  • overlap fix vs prior feature result (1158.61 ms): -0.63 ms

Prefetch counters after warm load:

revision prefetch ops requested bytes L1 bytes L2 bytes
unchanged feature 240 353,290,420,224 58,850,279,424 294,440,140,800
this PR with overlap fix 202 297,346,793,472 2,906,652,672 294,440,140,800

The overlap fix issued 38 fewer prefetch RPCs while preserving identical L2 bytes, demonstrating that all-L1 requests bypass the L2 window without removing L2 backpressure. It introduced no new cold/warm mismatch; one control mismatch disappeared.

Notes

  • The vLLM detailed-output comparison is completion-order based under concurrent requests; the indices above use the benchmark's existing cold/warm comparison.
  • GDS and vLLM/LMCache sources are unchanged.

- Add an optional TransferLayer prefetch capability for io_uring L2-to-L1 promotion\n- Defer scheduler admission until bounded background prefetch completes\n- Wire the disabled-by-default benchmark control and add focused regression tests
- Queue every vLLM-finished store in request insertion order.

- Bound staging snapshot and transfer admission with a FIFO semaphore.

- Move authoritative L1 range commit to DaseR and remove duplicate worker commits.

- Keep benchmark drain mandatory and remove dummy completion polling.

- Add regression coverage, end-to-end validation, and design documentation.
- reserve pinned L1 slices while io_uring promotions are in flight
- discard promotions invalidated by newer overlapping stores
- release failed promotion reservations and cover both races with regressions
- classify all-L1 external windows atomically and bypass the bounded L2 prefetch window\n- retain transfer leases through CUDA staging and block overlapping stores until release\n- propagate TP-safe lease ranges through scheduler, IPC, and worker load batches\n- add scheduler, transfer, server, IPC, and worker regression coverage
@GentleCold
GentleCold merged commit 78d2061 into master Jul 18, 2026
6 checks passed
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