Skip to content

feat(umbp): BatchTouch counts SSD copies and hands the tier only keys it holds - #882

Merged
isytwu merged 2 commits into
mainfrom
feat/umbp-touch-ssd-tier
Nov 11, 2026
Merged

isytwu merged 2 commits into
mainfrom
feat/umbp-touch-ssd-tier

Conversation

@isytwu

@isytwu isytwu commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

#791 gave the SSD tier a Touch for lookups (SsdBackend -> PeerSsdManager -> ShardedSsdTier / SSDTier), and #779's BatchTouch reaches it too. Two things are left for BatchTouch:

  • SsdBackend::Touch counts none of what it renews, so BatchTouch's count leaves out the SSD tier's copies.
  • PeerSsdManager::Touch hands the tier every key it is given. A lookup passes only the keys it found, but a BatchTouch of DRAM-resident prefixes makes the tier look each one up under SSDTier::mu_, the lock its reads and writes take. It also renews a key mid-eviction, which a read already misses.

This makes PeerSsdManager::Touch renew only the keys a read would find there (held, and not mid-eviction), pass only those to the tier, and return how many; SsdBackend::Touch returns that, so BatchTouch counts the SSD tier's copies, and its docs say so. The tier's own Touch (#791) is unchanged; this PR adds its first tests.

Measured

Kimi-K3 vLLM 1P1D DCP8, c70, standalone UMBP server on the prefill node with 1799 GB DRAM and a 1.2 TB SSD tier, AgentX trace, one hour of profiling per run, MI355X (smci355); the same build with and without the first revision of this PR (BatchTouch reaching the SSD tier, only the keys it holds passed on), on the same nodes back to back:

tok/s/GPU TTFT p50 / p90 (s) prompt tokens the prefill engine computes SSD reads (GB/h)
SSD tier touched 14,001 4.75 / 17.02 4.09% 25
DRAM only 14,072 4.44 / 16.28 4.07% 27

No difference beyond run-to-run noise: repeats of one configuration on one node pair differ by 0.3–0.45% in throughput and 2–5% in TTFT p50. At this capacity the DRAM touch (#779) already keeps the prefixes the GPU uses in DRAM, so few SSD-resident objects are in use. The change makes the touch behave like a read on every medium; it is not a throughput change.

Testing

  • Rebased onto main 5dc1f368 (feat(umbp): BatchTouch, so callers can report KV hits served by an upper tier #779 merged) with the patch unchanged: all 56 UMBP C++ test binaries pass on a host with RDMA, 745 gtest cases, and the SSD touch tests pass 20 times in a row (the race test 5 times). One of that host's eight ionic NICs had dropped off the bus, and its bridge's zeroed bus numbers abort PCI topology detection with or without this PR; the test container saw that bridge with its bus numbers restored, and the tests ran on the other seven NICs. Before the rebase, on main 7c27c146 with feat(umbp): BatchTouch, so callers can report KV hits served by an upper tier #779, all 56 binaries passed as well (742 cases); one case skips on its own condition (DisablingKeyHandlesAlsoStopsTheServerRemembering runs only with UMBP_KEY_HANDLE_SLOTS=0). New: PeerSsdEviction.TouchRefreshesLruAsAReadDoes, PeerSsdEviction.TouchReachesATierThatOrdersItsOwnEviction (only held keys reach the tier; a key mid-eviction is skipped), SsdBackendTest.TouchCountsTheKeysTheTierHolds, and three of the tier's own Touch: SegmentReclaimTest.TouchCountsAsAnAccess (segment order, unknown keys), ShardedTouchReachesTheShardHoldingEachKey, TouchesRaceReadsEvictionsAndWrites (a toucher, a reader and an evicting writer for 2 s: no bad read, no unknown key in the recency list). With PeerSsdManager::Touch as fix(umbp): a lookup renews the keys it finds, so eviction spares them until the load #791 wrote it (the count kept), only TouchReachesATierThatOrdersItsOwnEviction fails. Repeated with no failure: PeerSsdEviction.Touch* 50 times, the SSD backend's touch and lookup tests 20 times, the race test 10 times and the other two tier tests 20 times. clang-format 20.1.8 is clean.
  • The CI's Python steps, run locally on main 5dc1f368 with this PR: pytest tests/python/umbp 131 passed; umbp_prim_ci.py PASS with and without a master.

@isytwu
isytwu force-pushed the feat/umbp-touch-eviction-class branch from 0e790f1 to b0fea45 Compare November 9, 2026 07:35
@isytwu
isytwu force-pushed the feat/umbp-touch-ssd-tier branch from 177362b to 6e60a7d Compare November 9, 2026 07:35
@isytwu isytwu changed the title feat(umbp): BatchTouch refreshes the SSD tier's eviction order test(umbp): the SSD tier's Touch orders segments as a read does Nov 9, 2026
@isytwu
isytwu marked this pull request as ready for review November 9, 2026 09:10
@isytwu
isytwu force-pushed the feat/umbp-touch-eviction-class branch from b0fea45 to 62046b7 Compare November 9, 2026 09:44
@isytwu
isytwu force-pushed the feat/umbp-touch-ssd-tier branch from 6e60a7d to a49b184 Compare November 9, 2026 09:44
@isytwu isytwu changed the title test(umbp): the SSD tier's Touch orders segments as a read does feat(umbp): BatchTouch counts SSD copies and hands the tier only keys it holds Nov 9, 2026
@TianDi101

Copy link
Copy Markdown
Collaborator

This PR targets feat/umbp-touch-eviction-class (#779's branch), so CI has not run on it. Once #779 squash-merges, please retarget to main and rebase these two commits onto it, otherwise the diff will still carry #779's original commits; that push will also trigger CI. Alternatively, fold this into #779 before it merges.

… it holds

#791 gave the SSD tier a Touch for lookups, and BatchTouch reaches it too,
but SsdBackend::Touch counts none of what it renews, and
PeerSsdManager::Touch hands the tier every key it is given, so a BatchTouch
of DRAM-resident prefixes makes the tier look each one up under the lock
its reads and writes take.  The manager now renews only the keys a read
would find there -- held, and not mid-eviction -- passes only those to the
tier, and returns how many; SsdBackend returns that, so BatchTouch counts
the SSD tier's copies.  Tests cover the manager and the backend's count, and
the tier's own Touch, which had none: segment order, sharded routing, and
touches racing reads, writes and evictions.
A read-only follower is a separate SSDTier with its own in-memory index, and
Touch writes nothing to disk, so the follower's touch could never move the
owner's order: the check held whatever Touch did.
@isytwu
isytwu changed the base branch from feat/umbp-touch-eviction-class to main November 10, 2026 17:03
@isytwu
isytwu force-pushed the feat/umbp-touch-ssd-tier branch from 7e408ba to 44e15c8 Compare November 10, 2026 17:03
@github-actions

Copy link
Copy Markdown
Contributor

GPU CI for 44e15c82 (run): changed areas: umbp

lane runs jobs
mori no MI355X intranode, MI355X ROCm 10, MI355X JAX, MI355X internode
mi300x no MI300X intranode, MI300X internode
umbp yes UMBP unit test
cco no CCO unit test, CCO EPv2 single-node test, CCO internode
fused no CCO fused GEMM test
build yes MoRI build (compile check)

Test groups (the steps that run in those jobs): umbp.

Lanes follow the changed files. Adding ci:full re-runs CI with every lane, the full internode sweeps and every fused GEMM case; adding ci:mi300x re-runs it with the MI300X lanes added. /ci-rerun re-runs CI against the current main.

@isytwu
isytwu merged commit 25fcbee into main Nov 11, 2026
15 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.

2 participants