-
Notifications
You must be signed in to change notification settings - Fork 198
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
Optimize the batch deserialization perf #573
Conversation
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.
🚀
node/grpc/utils.go
Outdated
"github.com/wealdtech/go-merkletree" | ||
"github.com/wealdtech/go-merkletree/keccak256" | ||
"google.golang.org/protobuf/proto" | ||
) | ||
|
||
var ( | ||
maxDeserializationWorkers = 32 |
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.
would be nice to expose this in operator config for tuning purposes
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.
sounds good, I didn't make it so as I was thinking the validator was not using flag yet and wanted to do it together separately later (validation is actually using flag)
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.
🙏
Why are these changes needed?
The batch request deserialization is CPU intensive (especially at scale), however it's parallelizable.
This makes it about 5x faster in preprod test.
Checks