Repository navigation
[TENT] Share RDMA rail failures across workers - #5074
Open
xiaodouzi666 wants to merge 1 commit into
Open
xiaodouzi666 wants to merge 1 commit into
xiaodouzi666 wants to merge 1 commit into
Conversation
Each RDMA worker keeps its own RailMonitor, so a NIC pair that cannot be reached is discovered by every worker separately: each one waits for its own RC retry timeout (about 3.7 s on our test hosts) and needs three failures inside the error window before it pauses the rail. Only the first error of a timeout reaches the monitor; the work requests it flushes do not count, so a worker can take three timeouts to learn that a pair is dead. The monitors of one peer now share the failure count and the pause verdicts of each NIC pair through a process-wide table: failures are counted across workers, a pause one worker arms is adopted by the others on their next selection, and a success that resets the pair on one worker resets it for all. That is a successful probe, or a successful transfer on a worker that has counted a failure on the pair or holds its pause; a worker that has seen no failure keeps its fast path. The endpoints of a pair are shared by all workers already, so a pair one worker proved dead is dead for the rest. Probing and the Closed/Open/Half-Open state machine stay per worker; monitors without a peer machine id behave as before.
xiaodouzi666
requested review from
00fish0,
alogfans,
chestnut-Q,
doujiang24,
dtcccc and
staryxchen
as code owners
October 29, 2026 10:15
This branch has not been deployed
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.
Description
Fixes #4662
What was wrong.
RailMonitorper peer machine (WorkerContext::rails), so a NIC pair that cannot reach the peer is discovered by every worker separately.What this PR changes. The monitors of one peer machine share the failure count and the pause verdicts of each NIC pair through a process-wide table in
rail_monitor.cpp:markFailedtakes the shared count, with the same window rule as before.admit()andfindBestRemoteDevice()first compare a generation counter, which costs one atomic load when nothing changed. On a change the monitor:getOrCreateRail. The allocation cache and monitors without a peer keep today's behaviour.The table is keyed by NIC names, not ids, so monitors holding different topology snapshots agree. Probing and the Closed/Open/Half-Open state machine stay per worker.
GdrReachability(#2966) already applies the same process-wide idea to NIC/GPU pairs.Why this is safe.
(paused by another worker, cooldown=..s)and(recovered on another worker).Limits.
admit()arms. In a failure-free steady state the best path never admits that pair again.signal_intervalof 1. With selective signaling, successes inferred for unsignaled work requests ahead of an error CQE can withdraw a fresh pause.Suggested Merge Priority
Module
mooncake-transfer-engine)mooncake-store)mooncake-conductor)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Unit tests (
tent_rail_monitor_test, no RDMA device needed): 15 new cases inRailMonitorShareTest; the 23 existing cases are unchanged. They cover:Each case uses its own peer id, so the process-wide table does not leak between cases or
--gtest_repeatrounds. Each part of the change was reverted one line at a time (25 mutations), and every mutation made at least one case fail.Test commands:
cmake -S . -B build -DUSE_TENT=ON -DBUILD_UNIT_TESTS=ON -DBUILD_BENCHMARK=ON cmake --build build -j ctest --test-dir build/mooncake-transfer-engine/tent/tests -j8Test results:
tent_rail_monitor_testalso with--gtest_repeat=3 --gtest_shuffle, and under ASan)Two hosts.
tebench --backend=tent --xport_type=rdma, 6 threads, 1 MiB unless noted; main and this PR alternate.getOrCreateRailTwo observations from these runs:
Checklist
./scripts/code_format.shAI Assistance Disclosure
Claude was used during this period, and human review was implemented as well.