-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(downloaders): Download bodies while writing to disk to utilize bandwidth optimally #744
Comments
You can't do it without breaking the current control flow (e.g. delegating commit responsibility to stages), since downloaders are not separate processes, but short-lived streams (they exist only for the duration of a single |
Maybe the downloader can download larger slices than the commit threshold in a background task? And the bodies stream simply yields these values instead of downloading + yielding them? cc @mattsse also given stream territory |
Maybe related to the logic to be unified with Headers here #741 (comment) |
That block in the while loop is not I/O heavy, it is not writing to disk. I think the heavy part is in the downloader itself where it validates tx root in-place for each body which is blocking. Things are only written to disk when the stage is done ( This also seems to suggest that we are downloading bodies really fast but blocked on other stuff, so we can up the commit threshold. |
downloading should be a separate task then and the stage just controls that task, submits new batch requests, pulls responses then. |
Superceded by #764 |
Context
reth/crates/net/downloaders/src/bodies/concurrent.rs
Lines 123 to 126 in f21a402
bodies_stream
which concurrently batch polls the headers split in chunksreth/crates/net/downloaders/src/bodies/concurrent.rs
Lines 56 to 74 in a94560f
reth/crates/stages/src/stages/bodies.rs
Lines 241 to 263 in a94560f
reth/crates/stages/src/stages/bodies.rs
Lines 100 to 111 in a94560f
Solution
idk/not sure keen to discuss.
The text was updated successfully, but these errors were encountered: