Skip to content

feat(core): add SSD-backed RDMA owner for multi-tier KV cache - #453

Draft
GentleCold wants to merge 5 commits into
novitalabs:masterfrom
GentleCold:feat/ssd-backed-rdma-owner
Draft

GentleCold wants to merge 5 commits into
novitalabs:masterfrom
GentleCold:feat/ssd-backed-rdma-owner

Conversation

@GentleCold

@GentleCold GentleCold commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR adds SSD-backed RDMA ownership to PegaFlow's multi-tier KV cache path. Once an SSD write is committed, the owner advertises that SSD generation in MetaServer and can serve it through the existing remote fetch path. RAM eviction therefore does not make a still-valid SSD copy undiscoverable.

The implementation is intentionally limited to the SSD owner path:

  • committed SSD generations register an SSD tier owner; writing generations remain invisible;
  • SSD ring overwrite removes the corresponding SSD tier owner;
  • (shard_id, begin) generation checks prevent late completions from deleting or replacing a newer generation;
  • MetaServer tracks RAM and SSD tier bits independently and supports tier-filtered contiguous-prefix planning;
  • RDMA serving can stage from SSD and return the planned continuous prefix;
  • requester fetches accept RAM or SSD sources;
  • existing RAM source-priority/reclaim behavior is unchanged, including the RAM-only reclaimable hint accounting.

This replacement removes the unrelated S3-FIFO, TinyLFU, prefix-aware eviction, and chained-prefetch experiments from the old PR head. The diff is now 14 files (+791/-207) relative to master.

Validation

Remote validation ran on 192.168.172.86 (8×RTX 5090) with a real vLLM 2P2D replay:

  • TP2, GPU sets 0,1 / 2,3 / 4,5 / 6,7
  • block size 128, concurrency 8, request rate inf, max output tokens 1
  • 10 GB RAM and 20 GB local SSD per instance
  • max-model-len=16384
  • trace SHA256: 253c2b787a7c7d5bdfeb1de76ac1caf91416553ce0297c2b7866f042274b4d42
  • workload manifest SHA256: 5503002745792d64b74fad09d58f990630cc05b75edb15310dc96eabc0468f12
  • 4000 selected records; 845 long records filtered; 3155 successful requests; both runs used the same manifest

The 5090 CUDA NIXL buffer path failed with ibv_reg_mr(..., cuda): Bad address, so both runs used the CPU NIXL buffer fallback. The complete P/D MultiConnector path was still exercised; TTFT and throughput below should be interpreted with that fallback in mind.

Metric master baseline minimal SSD owner Change
external hit ratio 80.3673% 84.5841% +4.2169 pp
RAM hit blocks 63,923 60,510 -3,413
RDMA hit blocks 57,329 67,508 +10,179
local SSD hit blocks 989 637 -352
TTFT p50 785.0 ms 826.0 ms +40.9 ms
TTFT p95 1,687.1 ms 1,814.4 ms +127.3 ms
successful throughput 9.309 req/s 8.936 req/s -4.0%

Checks on the final feature workspace:

  • cargo fmt --all -- --check
  • cargo check --release --no-default-features --features cuda-13,rdma --bin pegaflow-server --bin pegaflow-metaserver
  • cargo test -p pegaflow-core --lib --no-default-features --features cuda-13,rdma: 162 passed, 1 ignored
  • cargo test -p pegaflow-metaserver --lib: 40 passed

TP1 was not viable for this model because a single 32 GB 5090 has almost no KV-cache capacity after loading the 29.35 GiB weights, so TP2 is used for the comparison.

Compatibility

All PegaFlow server, MetaServer, protocol, and requester components must be deployed from the same protocol version when enabling SSD owner metadata.

@GentleCold
GentleCold force-pushed the feat/ssd-backed-rdma-owner branch from 8b2933f to e610147 Compare September 11, 2026 23:46
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