perf: add thread-priority utils and boost engine/sparse-trie priority#22541
Merged
Conversation
Adds a utils module to reth-tasks that re-exports the thread-priority crate. Uses ThreadPriority::Max for the engine and sparse-trie threads to reduce scheduling latency on the critical path. Amp-Thread-ID: https://ampcode.com/threads/T-019c9077-b36e-71c5-9169-b736627b7e7a Co-authored-by: Amp <amp@ampcode.com>
Contributor
|
Amp-Thread-ID: https://ampcode.com/threads/T-019c9077-b36e-71c5-9169-b736627b7e7a Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c9077-b36e-71c5-9169-b736627b7e7a Co-authored-by: Amp <amp@ampcode.com>
DaniPopes
approved these changes
Feb 25, 2026
Contributor
|
derek bench |
Member
|
cc @DaniPopes ✅ Benchmark complete! View job Benchmark Results
500 blocks Wait Time BreakdownPersistence Wait
Trie Cache Update Wait
Execution Cache Update Wait
Charts
|
Contributor
|
derek bench |
Member
|
cc @DaniPopes ✅ Benchmark complete! View job Benchmark Results
500 blocks Wait Time BreakdownPersistence Wait
Trie Cache Update Wait
Execution Cache Update Wait
Charts
|
Amp-Thread-ID: https://ampcode.com/threads/T-019c92a3-7084-72c9-adf2-b0cd84c00be5 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c92a3-7084-72c9-adf2-b0cd84c00be5 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c92a3-7084-72c9-adf2-b0cd84c00be5 Co-authored-by: Amp <amp@ampcode.com>
DaniPopes
approved these changes
Feb 25, 2026
Contributor
|
derek bench |
Member
|
cc @DaniPopes ✅ Benchmark complete! View job Benchmark Results
500 blocks Wait Time BreakdownPersistence Wait
Trie Cache Update Wait
Execution Cache Update Wait
Charts |
mediocregopher
pushed a commit
that referenced
this pull request
Feb 25, 2026
…#22541) Co-authored-by: Amp <amp@ampcode.com>
This was referenced May 27, 2026
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
Add a
utilsmodule toreth-tasksthat re-exports thethread-prioritycrate, and use it to setThreadPriority::Maxon the engine and sparse-trie threads.Changes
thread-priorityworkspace depreth_tasks::utilsmodule re-exportingthread_priority::*ThreadPriority::Maxon the engine thread (crates/engine/tree/src/tree/mod.rs)ThreadPriority::Maxon the sparse-trie thread (crates/engine/tree/src/tree/payload_processor/mod.rs)Testing
cargo check -p reth-tasks -p reth-engine-treeand clippy pass clean.Prompted by: danipopes