GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: update iterations in benchmark/crypto/aes-gcm-throughput.js by lucshi · Pull Request #50929 · nodejs/node

Conversation

@lucshi

@lucshi lucshi commented Nov 27, 2023 •
edited by H4ad
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

All reactions
Lei Shi
benchmark: update iterations in benchmark/crypto/aes-gcm-throughput.js
6054858
Fixes: nodejs#50571
@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. crypto Issues and PRs related to the crypto subsystem. labels Nov 27, 2023
@H4ad

H4ad commented Dec 2, 2023

Copy link
Copy Markdown
Member

I don't think that worth changing from 500 to 2500, I don't think this will trigger any optimization by V8.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lucshi

lucshi commented Dec 2, 2023

Copy link
Copy Markdown
Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

H4ad
H4ad approved these changes Dec 2, 2023
View reviewed changes

@H4ad H4ad left a comment

Copy link
Copy Markdown
Member

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.

All reactions
@H4ad H4ad added commit-queue PRs queued for automated landing through the Commit Queue. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Dec 4, 2023
jasnell
jasnell approved these changes Dec 9, 2023
View reviewed changes
@H4ad H4ad added the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 9, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 9, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 29af78e into nodejs:main Dec 9, 2023
@nodejs-github-bot

nodejs-github-bot commented Dec 9, 2023

Copy link
Copy Markdown
Collaborator

Landed in 29af78e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

RafaelGSS pushed a commit that referenced this pull request Dec 15, 2023
Lei Shi @RafaelGSS
benchmark: update iterations in benchmark/crypto/aes-gcm-throughput.js
087fb09
Fixes: #50571
PR-URL: #50929
Refs: #50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Dec 15, 2023
v21.5.0 proposal #51166
Merged
richardlau pushed a commit that referenced this pull request Mar 25, 2024
Lei Shi @richardlau
benchmark: update iterations in benchmark/crypto/aes-gcm-throughput.js
19b943b
Fixes: #50571
PR-URL: #50929
Refs: #50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@richardlau richardlau mentioned this pull request Mar 25, 2024
v20.12.0 proposal #52212
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@H4ad 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.

Projects

None yet

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.

4 participants

@lucshi @H4ad @nodejs-github-bot @jasnell
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.