-
Notifications
You must be signed in to change notification settings - Fork 464
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
Move prewarming as early as possible #8001
Conversation
Is it worth it though? How much do we gain on normal flow? |
Means it gets the prewarmer threads queued to ThreadPool before Every microsecond counts for the early prewarms (beacon root and first txs) |
ok does it register on our grafana graphs? |
Yes though can't find it atm (am doing a full sync) We want the prewarming to front run the txs. Block takes 10ms running 300 tx, so roughly 33 microseconds per tx. At that speed any and all edge is significant; as to whether the tx is prewarmed or not. This I think is the maximum it can go ahead (I moved it earlier but was unhappy that some of the block wasn't set in state, so missing trienode errors) |
Moved |
skipPrewarming = preWarmer is null || suggestedBlock.Transactions.Length < 3; | ||
// If cancelationTokenSource is not null it means we are in first iteration of loop | ||
// and started prewarming at method entry, so don't start it again | ||
if (cancellationTokenSource is null && !skipPrewarming) | ||
{ | ||
(cancellationTokenSource, preWarmTask) = PreWarmTransactions(suggestedBlock, preBlockStateRoot); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is very similar to the one above, can we have a helper method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved into PreWarm method
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing