Skip to content

fix(umbp): a local eviction round no longer rescans its queued demotions per batch - #783

Merged
TianDi101 merged 2 commits into
mainfrom
fix/umbp-local-evict-rescan
Oct 16, 2026
Merged

TianDi101 merged 2 commits into
mainfrom
fix/umbp-local-evict-rescan

Conversation

@TianDi101

Copy link
Copy Markdown
Collaborator

What

PeerPool::ReclaimBackend fetched EvictionCandidates(window), evicted one 64-key batch, then fetched again. A queued demotion keeps its key in the source tier until the transition worker copies it, so each refetch walked past every queued key again under the medium's LRU lock, which is quadratic in the round. A round now uses each fetch in full before asking again.

Why

E2E with promote_mode: move (DRAM 300 GB / SSD 600 GB, on_read): the evictor thread sat at 100% CPU in PageBackend::EvictionCandidates with rounds stuck for 16+ minutes. DRAM stayed at 100%, and the SSD behind it went unreclaimed until full, which caused 1.28M SSD write failed errors and 103k demotions dropped after retry.

Test

PeerPoolLocalEviction.ARoundDoesNotRescanItsQueuedDemotionsPerBatch: one gated round over 8,000 keys may fetch at most 40 times. The old loop fetches 67 times; this one passes. test_peer_pool passes 40/40.

🤖 Generated with Claude Code

TianDi101 and others added 2 commits October 16, 2026 04:54
…ons per batch

ReclaimBackend fetched EvictionCandidates(window), evicted one 64-key
batch, then fetched again. A queued demotion keeps its key in the
source tier until the transition worker copies it, so every refetch
walked past all of them again under the medium's LRU lock: quadratic
in the round. With promote_mode move (each DRAM eviction a real copy)
an e2e round ran for minutes at 100% CPU, and the SSD tier behind it
went unreclaimed until it was full.

A round now uses each fetch in full before asking again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@TianDi101
TianDi101 merged commit 9b1bb92 into main Oct 16, 2026
TianDi101 added a commit that referenced this pull request Oct 16, 2026
…ce-read-touch

# Conflicts:
#	src/umbp/include/umbp/local/tiers/sharded_ssd_tier.h
#	src/umbp/include/umbp/local/tiers/ssd_tier.h
#	src/umbp/local/tiers/sharded_ssd_tier.cpp
#	src/umbp/local/tiers/ssd_tier.cpp
#	tests/cpp/umbp/local/test_ssd_segment_reclaim.cpp
TianDi101 added a commit that referenced this pull request Oct 16, 2026
…-ssd-direct-migration

# Conflicts:
#	src/umbp/distributed/peer/backend/ssd_backend.cpp
#	src/umbp/distributed/pool/peer_pool.cpp
#	src/umbp/include/umbp/distributed/peer/backend/page_backend.h
#	src/umbp/include/umbp/distributed/peer/backend/ssd_backend.h
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