Open emhane opened 1 week ago
šš½āāļø
@emhane Can this issue be assigned to me? i will carefully implement the feature. thanks
@emhane, can I be assigned this issue, I'll tackle it as soon as possible
Steven was first. many more issues in the repo though @Benjtalkshow and @devcollinss . recommended to start with anything with label good-first-issue
.
Describe the feature
Default values for budget of in-/egress traffic to process, before yielding thread, may not be safe for all hw setups. This, since another task handles sending of the messages than that which processes them. Responses stay in memory until the thread is yielded, unless the machine has enough cores to send them before task for processing messages yields the thread. (Ref https://github.com/paradigmxyz/reth/issues/8115)
To investigate this, we can expose budgets for batch processing p2p traffic, via cli. This will help find the right defaults, which I suspect will be 1 in most cases to cater for machines meeting only min requirements on RAM and number of cores. Asides helping to set defaults, this can be used to custom fit batch processing p2p messages for each specific machine for likely big perf gains. For example, it may make sense to process certain types of messages faster than others, so the budget for processing those can be set bigger.
The following constants need to be exposed via cli.
https://github.com/paradigmxyz/reth/blob/01f382b739b6db371d5a1a762f99ee1c6366c64e/crates/net/network/src/budget.rs#L1-L43
Additional context
No response