-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
feat: add option to disable thread pool for keystore decryption #6949
Merged
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #6949 +/- ##
============================================
+ Coverage 62.51% 62.52% +0.01%
============================================
Files 575 575
Lines 61015 61050 +35
Branches 2120 2138 +18
============================================
+ Hits 38141 38170 +29
- Misses 22835 22841 +6
Partials 39 39 |
Rebasing this branch on top of updating bls-kestore library, we are sub 1 second in Kurtosis
|
Performance Report✔️ no performance regression detected Full benchmark results
|
wemeetagain
approved these changes
Jul 15, 2024
🎉 This PR is included in v1.20.2 🎉 |
🎉 This PR is included in v1.21.0 🎉 |
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.
Motivation
During testing in ChainSafe/bls-keystore#61 (see benchmarks) I noticed that spawning worker threads to decrypt keystores is quite slow in some environments like docker and it takes a few seconds for decrypt operations to speed up.
It takes around ~10-16 seconds in kurtosis to decrypt 64 keystores
The reason for this seems to be that 1) spawning workers takes a bit of time, and 2) there seems to be a warm up period (especially inside docker) which leads to bad results. More details in ChainSafe/bls-keystore#61 (comment).
Looking at the keystores used by Kurtosis, those are pbkdf2 and in addition set c=2 in kdf params which is insecure but much faster and good for testing while most normal users use scrypt which is much slower per decrypt operation, like 1000x slower than that.
This means ideally, we wanna keep workers for normal usage but disable the thread pool for testing environments like Kurtosis.
Disabling the worker pool, it takes ~1 sec to decrypt 64 keys in Kurtosis
This is on par with other clients, as noted in #6946.
Description
Add option
--disableKeystoresThreadPool
to disable thread pool for keystore decryption.