Skip to content

refactor(connector): restore pipeline behavior and boundaries#92

Merged
GentleCold merged 4 commits into
masterfrom
refactor/connector-deepen-pipeline
Jul 12, 2026
Merged

refactor(connector): restore pipeline behavior and boundaries#92
GentleCold merged 4 commits into
masterfrom
refactor/connector-deepen-pipeline

Conversation

@GentleCold

@GentleCold GentleCold commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keep SchedulerConnectorMixin and WorkerConnectorMixin as separate vLLM role adapters.
  • Organize scheduler implementation under daser/connector/scheduler/ and worker implementation under daser/connector/worker/.
  • Restore bounded concurrent store execution, streaming buffer reuse for large requests, independent load failure handling, and shutdown cleanup.
  • Restore request-level load performance diagnostics and publish L1 hit, L1 miss, and L2 read metrics.
  • Derive independent fixed load/store pools from one explicit 6 GiB CUDA staging ceiling per worker.
  • Make DaseR drain failures abort benchmarks and require both L1 and L2 activity in evict-mode warm validation.

Architecture

DaserConnector remains the vLLM composition root. Scheduler and worker implementation packages do not import each other.

  • RequestLifecycle owns scheduler request state and synchronous control-plane IPC.
  • WorkerRuntime owns finalized KV geometry, step metadata, pipeline configuration, and coordinated shutdown.
  • LoadPipeline owns load queueing, fixed staging leases, IPC, restore, diagnostics, failure invalidation, and completion.
  • StorePipeline owns deferred saves, producer ordering, fixed staging leases, transfer, commit, and completion.
  • Shared metadata and IPC contracts remain at the connector root.

No pipeline ABC, generic dispatcher, compatibility re-export layer, or variable-size CUDA allocator was added.

Behavior restored

  • Independent store requests execute concurrently up to store pool depth.
  • Requests larger than the pool stream batches sequentially through one reusable buffer.
  • Load requests complete and fail independently; failures invalidate only their affected block IDs.
  • Restored KV becomes visible after the dedicated load stream synchronizes, without device-wide synchronization.
  • Existing transfer responses now provide request-level bytes, copies, copy runs, IPC time, dispatcher wait, KV copy, worker sync, transfer open/load/sync, L1 hit/miss, and L2 read diagnostics.

Staging memory

Load and store retain independent fixed pools so store traffic cannot consume load buffers. One startup calculation enforces a combined ceiling of 6144 MiB per worker and reserves at least one buffer for each direction.

The TP2 validation run selected load depth 3 and store depth 2:

Worker Combined allocation
TP0 5,921,570,815 bytes
TP1 6,010,699,775 bytes

Both are below the 6 GiB ceiling (6,442,450,944 bytes).

Validation

  • pre-commit run --all-files
  • pytest -q tests/connector (119 passed)
  • pytest -q tests/server tests/transfer (154 passed)
  • benchmark utility tests (106 passed)
  • pytest -q -m "not integration and not slow" (353 passed, 100 deselected)
  • Complete no-evict master and PR benchmarks
  • Complete PR evict benchmark with successful drain, no failed requests, and both cache tiers exercised
  • Benchmark scratch data and service processes cleaned up

Performance parity

Metric Master PR Difference
Cold mean TTFT 8,630.27 ms 8,571.86 ms -0.68%
Cold prompt throughput 17,893.93 tok/s 18,015.26 tok/s +0.68%
Warm mean TTFT 441.46 ms 439.92 ms -0.35%
Warm prompt throughput 349,735.13 tok/s 352,416.58 tok/s +0.77%
Warm backend hit 100% 100% unchanged
Failed requests 0 0 unchanged

The PR evict run completed with l1_hits=176, l1_misses=880, and l2_reads=880. Its complete warm phase mean TTFT was 553.52 ms and prompt throughput was 278,552.04 tok/s.

Cold/warm exact match was 98% on both master and the PR, so the remaining mismatch predates this refactor.

mypy . remains blocked by the repository's existing duplicate-module discovery (config and daser.config) and pre-existing annotation errors outside this change.

- isolate worker load, store, memory, and runtime responsibilities

- centralize scheduler request lifecycle and immutable store intents

- narrow staging to tensor transforms and document ownership flows

- preserve TP2 cold and warm cache behavior with regression coverage
- move load and store state machines behind pipeline operation APIs
- retain worker and scheduler adapters while narrowing runtime coordination
- propagate delayed tensor-parallel geometry into pipeline ownership
- select the staged CUDA device before background IPC export
- remove duplicated config state and private compatibility surfaces
@GentleCold GentleCold changed the title refactor(connector): deepen execution pipeline ownership refactor(connector): deepen worker pipeline ownership Jul 12, 2026
- separate scheduler and worker implementations into role-owned packages
- restore concurrent streaming load and store pipeline behavior
- cap independent fixed staging pools under one 6 GiB worker budget
- restore load diagnostics and strengthen drain and tier benchmark gates
- add behavior-contract coverage and update connector design documentation
@GentleCold GentleCold changed the title refactor(connector): deepen worker pipeline ownership refactor(connector): restore pipeline behavior and boundaries Jul 12, 2026
- declare torch, vLLM, and CuPy requirements before connector imports
- keep worker pipeline behavior tests active in full development environments
@GentleCold
GentleCold merged commit dc58626 into master Jul 12, 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