DAOS-18541 rebuild: accumulate more OIDs per migrate RPC to reduce RPC count#17704
Open
wangshilong wants to merge 1 commit intomasterfrom
Open
DAOS-18541 rebuild: accumulate more OIDs per migrate RPC to reduce RPC count#17704wangshilong wants to merge 1 commit intomasterfrom
wangshilong wants to merge 1 commit intomasterfrom
Conversation
Fix yield-count accounting in the scanner: rebuild_object() is a pure in-memory btree insert and does not need to contribute yield pressure. A send-side batching policy is also introduced: the send ULT defers flushing until at least REBUILD_SEND_BATCH_MIN OIDs are queued or REBUILD_SEND_BATCH_TIMEOUT_SEC seconds have elapsed, preventing a flood of small migrate RPCs when the scanner runs faster than the sender — particularly under reintegration workloads. Signed-off-by: Wang Shilong <shilong.wang@hpe.com>
|
Ticket title is 'Rebuild stuck on Bear cluster' |
gnailzenh
reviewed
Mar 15, 2026
| if (rc) | ||
| D_GOTO(out, rc); | ||
|
|
||
| arg->yield_cnt--; |
Contributor
Author
There was a problem hiding this comment.
I thought rebuild_object() is a btree_insert()(it is a pure memory operations) probably ok not acccounting for yield, could add it back.
| if (dbtree_is_empty(tls->rebuild_tree_hdl)) { | ||
| tree_empty = dbtree_is_empty(tls->rebuild_tree_hdl); | ||
| scan_done = tls->rebuild_pool_scan_done; | ||
|
|
Contributor
There was a problem hiding this comment.
how about "now = daos_gettime_coarse()" at here
| if (tree_empty) { | ||
| /* Reset wait clock and yield to let scan make progress. */ | ||
| tls->rebuild_send_wait_start = daos_gettime_coarse(); | ||
| dss_sleep(0); |
Contributor
There was a problem hiding this comment.
I'd suggest to change this to dss_sleep(10) as well, make it consistent with the code below
| /* Minimum pending objects before the send ULT flushes a batch (25% of max). */ | ||
| #define REBUILD_SEND_BATCH_MIN (REBUILD_SEND_LIMIT / 4) | ||
| /* Maximum seconds to wait for a batch to fill before flushing anyway. */ | ||
| #define REBUILD_SEND_BATCH_TIMEOUT_SEC 2 |
Contributor
There was a problem hiding this comment.
probably change this to 1 seconds is OK
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.
Fix yield-count accounting in the scanner: rebuild_object() is a pure in-memory btree insert and does not need to contribute yield pressure. A send-side batching policy is also introduced: the send ULT defers flushing until at least REBUILD_SEND_BATCH_MIN OIDs are queued or REBUILD_SEND_BATCH_TIMEOUT_SEC seconds have elapsed.
Without batching, a fast scanner floods the destination rank with many small RPCs, exhausting IB receive buffers and triggering timeouts. This is especially severe during reintegration, where all OIDs are concentrated on a single target rank.
Steps for the author:
After all prior steps are complete: