Repository navigation
feat(umbp): peer-driven eviction with master-ranked victims (opt-in) - #760
Merged
Merged
Conversation
With a master, a node can evict at its own watermarks instead of waiting for the master's EvictKey rounds, while still taking its victims from the master's cluster-wide recency. - Master: new GetEvictionCandidates RPC returns a node's keys on one medium (optionally one logical tier), least recently accessed first, until their sizes cover the requested bytes; master-leased keys are skipped. RegisterClient and every Heartbeat carry peer_driven_eviction, and EvictionManager leaves such nodes out of its rounds (in memory only). ClientRegistryConfig::advertise_peer_driven_eviction gates both. - Peer: local eviction asks a candidate source first (at most once per 200 ms per backend), rounds its value sizes up to the backend's pages, evicts through PeerPool::Evict, and covers the rest from the medium's own LRU. In peer-driven mode PoolClient runs local eviction for every medium, at a tiered policy's per-tier watermarks when there is one. - Opt-in: PoolClientConfig::peer_driven_eviction or UMBP_PEER_DRIVEN_EVICTION=1, and only once the master confirms support; otherwise behaviour is unchanged. New metric event master_key. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replaces the peer_driven_eviction switch with PoolClientConfig::eviction_mode (env UMBP_EVICTION_MODE), which says how a node with a master evicts: - local (default): every medium at the node's own watermarks, by its own LRU, without asking the master. - master_ranked: the same, with victims ranked by the master (GetEvictionCandidates), falling back to local LRU. - master: DRAM/HBM wait for the master's EvictKey rounds; SSD still evicts locally (the previous behaviour). A self-evicting node (local or master_ranked) asks the master to leave it out of its rounds; every mode still serves EvictKey, so the master can evict on demand. A node without a master evicts locally as before. Self-evicting nodes use a tiered policy's per-tier watermarks when there is one. Tests that fill tiny tiers on purpose (cross-node smoke, tier benchmark) now run in master mode, the behaviour they were written against. Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 of 10 tasks
Collaborator
Author
|
Folded into #741 by fast-forward (GitHub marked this PR merged because its commits are now on #741's branch). The commit is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Peer-driven ("pull") eviction. With a master, a node evicts at its own watermarks, per backend, instead of waiting for the master's
EvictKeyrounds. It still takes its victims from the master's cluster-wide recency.Before, the master decided both when and what. It used one global 0.9/0.7 pair on each node's summed per-medium usage, read from a heartbeat up to 5 s old. So it could not see a full member backend inside a bigger medium, or two logical tiers sharing a medium. Now the node decides when and how much, and the master decides which keys.
Off by default. Turn it on with
UMBP_PEER_DRIVEN_EVICTION=1(orPoolClientConfig::peer_driven_eviction), against a master that supports it. Otherwise nothing changes.How it works
GetEvictionCandidates{node, tier, logical_tier, bytes}. The master answers from its index: that node's keys on that medium (and logical tier, if given), least recently accessed first, until their sizes coverbytes. Master-leased keys are skipped.PeerPool::Evict(demote or drop, re-checking local leases and pins). It counts the bytes as before, including queued demotions.Compatibility
peer_driven_eviction=10)EvictKey; SSD evicts locally1supports_peer_driven_eviction, so the node doesn't switchadvertise_peer_driven_eviction=false1UNIMPLEMENTEDWhere the flag lives: the master keeps it in memory only. The node re-sends
peer_driven_evictionon register and on every heartbeat, so a restarted master, or another master sharing the store, picks it up within one heartbeat. No store schema change.Changes
GetEvictionCandidatesRPC.peer_driven_evictiononRegisterClientRequestandHeartbeatRequest.supports_peer_driven_evictiononRegisterClientResponse.SelectPeerEvictionCandidates(ineviction_manager.cpp).EvictionManager::SetPeerDriven/PeerDriven; rounds skip peer-driven nodes.ClientRegistryConfig::advertise_peer_driven_eviction.MasterClient::RequestPeerDrivenEviction/PeerDrivenEviction/GetEvictionCandidates.PeerPool::SetEvictionCandidateSource;ReclaimBackendtries ranked candidates first, then the medium's own order.PoolClient:mori_umbp_client_local_evict_total{event="master_key"}counts the evicted keys that came from the master's ranking.PoolClient::LocalEvictionStats()exposes the counters.UMBP_PEER_DRIVEN_EVICTIONinruntime-env-vars.md.Test plan
MasterPeerDrivenEviction.RanksANodesKeysAndSkipsItInRounds: ranking by recency, the byte budget, the logical-tier filter and the key cap. A peer-driven node gets noEvictKey; turning the flag off restores rounds.PeerPoolLocalEviction.RankedCandidatesGoFirstAndTheMediumCoversTheRest: the source's ranking wins over the LRU, and a stale key is skipped. Value sizes are rounded to pages, so the pass stops exactly at the overage, and the medium covers the rest. One query per pass.test_umbp_peer_driven_eviction(new): a real master and DRAM node over gRPC.tests/cpp/umbp(53 tests) inrocm/mori-devwith RDMA: 52/53. The one failure wasumbp_pool_client_ranges(known GPU-readback flake). Run on their own, both known flakes passed 3/3. The new tests passed 30/30 (unit) and 5/5 (end to end) repeats.EnumerateEvictionCandidatesalready exists there).Known limits / follow-ups
EvictionManagerround. With a logical-tier filter the store can't cap the rows. Fine at a few nodes; at scale it needs the per-(node, tier)LRU index.RouteGetwindow), so a routed-but-not-yet-resolved read can miss. Masterless and SSD local eviction already behave this way.umbp_cross_node_smokefills tiny DRAM tiers past 90% and expects nothing to be evicted right away.🤖 Generated with Claude Code