GeezerVison is showing github.com — benchmark: update iterations in benchmark/crypto/aes-gcm-throughput.js by lucshi · Pull Request #50929 · nodejs/node
Conversation
lucshi
commented
Nov 27, 2023
•
edited by H4ad
Loading
Uh oh!
There was an error while loading. Please reload this page.
Refs: #50571
Below is score improvement from 500 to 2500, measured on Cascake server.
Improvement can be a bit more if changing to 5000 but the running time will be notable longer than appropriate duration.
To make it clear, I will submit more PRs one by one to address each case in crypto, and tracked by 50571 issue.
crypto/aes-gcm-throughput.js cipher="aes-128-gcm" 554.5625838906785 n=2500 percent=144.46%
crypto/aes-gcm-throughput.js cipher="aes-128-gcm" n=2500 percent=134.25%
crypto/aes-gcm-throughput.js cipher="aes-128-gcm" n=2500 percent=136.22%
crypto/aes-gcm-throughput.js cipher="aes-128-gcm" n=2500 percent=151.78%
crypto/aes-gcm-throughput.js cipher="aes-128-gcm" n=2500 percent=125.49%
crypto/aes-gcm-throughput.js cipher="aes-192-gcm" 557.082005808399 n=2500 percent=131.03%
crypto/aes-gcm-throughput.js cipher="aes-192-gcm" n=2500 percent=131.05%
crypto/aes-gcm-throughput.js cipher="aes-192-gcm" n=2500 percent=136.30%
crypto/aes-gcm-throughput.js cipher="aes-192-gcm" n=2500 percent=149.98%
crypto/aes-gcm-throughput.js cipher="aes-192-gcm" n=2500 percent=123.60%
crypto/aes-gcm-throughput.js cipher="aes-256-gcm" 557.9763934240019 n=2500 percent=130.56%
crypto/aes-gcm-throughput.js cipher="aes-256-gcm" n=2500 percent=130.17%
crypto/aes-gcm-throughput.js cipher="aes-256-gcm" n=2500 percent=135.86%
crypto/aes-gcm-throughput.js cipher="aes-256-gcm" n=2500 percent=148.04%
crypto/aes-gcm-throughput.js cipher="aes-256-gcm" n=2500 percent=123.15%
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I don't think that worth changing from 500 to 2500, I don't think this will trigger any optimization by V8.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
I don't think that worth changing from 500 to 2500, I don't think this will trigger any optimization by V8.
Hi Vinicius,
The rational of this change is not to trigger JIT, but make the crypto code dominate the execution phase instead of fwrite. When the iteration was 500, most execution time was occupied by fwrite. When iterations was increased to 2500, most execution time would be occupied by crypto. To make the scoring reasonable, we need to increase the iterations. After some experiments I found 2500 is a proper value to avoid long execution time.
I attached the perf log of 500 and 2500 and please see if the change made sense. Thanks!
2500.perf.log
500.perf.log
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
In this case, make sense, thanks for the PR.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
jasnell
jasnell approved these changes
H4ad
H4ad approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
benchmark
Issues and PRs related to Node.js benchmarks and benchmarking infrastructure.
crypto
Issues and PRs related to the crypto subsystem.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|