perf(rpc): drop debug traces in a blocking task#7063
Closed
Conversation
mattsse
reviewed
Mar 8, 2024
Collaborator
mattsse
left a comment
There was a problem hiding this comment.
this would certainly speed up a single request, unclear how this performs if the node is at max CPU
we could also try reusing the inspector across multiple runs when tracing block and not dropping it by only clearing it
Comment on lines
+557
to
+560
| let geth_builder = inspector.into_geth_builder(); | ||
| let frame = | ||
| geth_builder.geth_call_traces(call_config, res.result.gas_used()); | ||
| self.drop_in_task(geth_builder); |
Collaborator
There was a problem hiding this comment.
with #7063
the call+prestate tracer lo longer record any stack+memory so I think we can get away without handling these
Comment on lines
-571
to
+579
| db, | ||
| )?; | ||
| let geth_builder = inspector.into_geth_builder(); | ||
| let frame = geth_builder.geth_prestate_traces(&res, prestate_config, db)?; | ||
| self.drop_in_task(geth_builder); |
Collaborator
There was a problem hiding this comment.
this could spawn >200 drop tasks per request when tracing an entire block.
unsure about the sideeffects when the node is under heavy load
Member
|
I think we maybe try Seitz's fixes first, given they're obviously safe, and we can do this as follow-up if we're not #1 in trace perf then? |
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.
As discussed, 10-15% of the time spent in debug rpc calls is just dropping the trace arena when stack is enabled.