Repository navigation
perf(tuner): keep every tuner computation within 80% of logical CPUs - #1003
Merged
Merged
Conversation
The search pool alone took about 90% of the CPUs, and the variant-column pool, the readiness pass, the table replay and the By-coin auto-pick ran beside it on top of that budget, some of them in rayon's global pool. One budget now sizes both tuner pools so their sum stays at 80% of the logical CPUs, those computations run inside the pools with read cancellation carried along, rayon's global pool is capped at startup as a backstop, and the search time estimate uses the real pool size.
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.
What & why
The tuner could take more than 80% of the CPU: the search pool was sized at ~90% of logical CPUs, and the variant-column pool, readiness pass, table replay and By-coin auto-pick ran beside it, partly in rayon's global pool.
TUNER_CPU_PCT = 80) carves both the search pool and the column pool so their sum fits.How to verify
cargo test -p moon-core threshold_search(budget arithmetic for 1–56 CPUs),cargo test -p moon-ui-gpui --bin moonterminal estimate.Known limits: on 1–2 CPU machines search + column still take 2 threads; a few light per-row replays after a tape fetch and the manual By-coin pick stay on their own single thread.