-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
benchmark: rewrite the startup performance benchmark #45746
Merged
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
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark.
The previous benchmark was inaccurate in several ways: - It previously measured "how many workers/child processes can finish loading in parallel in 1 second" which is prone to wrong interpretations. It's also not typical for users to spin up >20 workers/child processes in parallel, which was what the benchmark usually ended up doing. The parallelism can also be greatly affected by system configurations. - The time spent on loading a Node.js binary for the first time varies greatly depending on system configurations, but it was inevitable for the benchmark to load Node.js multiple times to reduce the influence of fluctuations. This patch rewrites the benchmark so that: - It now measures "how long it takes to finish 30 workers/child processes in serial" which is generally more in line with how other benchmarks are written and with the figures one gets from doing something like `time node index.js` or `hyperfine 'node index.js'` - It now warms up the loading of the Node.js instance to reduce the statistical outliers, so that we get more meaningful figures when trying to compare the startup performance of different Node.js binaries.
Review requested:
|
nodejs-github-bot
added
the
benchmark
Issues and PRs related to the benchmark subsystem.
label
Dec 5, 2022
New benchmark results from #45659, which is more in line with the results I see from hyperfine:
I'll recompile and see the new results from #45716 |
New benchmark numbers from #45716
|
legendecas
reviewed
Dec 5, 2022
legendecas
approved these changes
Dec 6, 2022
Linter is still complaining. |
8 tasks
@nodejs/performance Can I have some reviews please? |
anonrig
approved these changes
Dec 8, 2022
anonrig
added
performance
Issues and PRs related to the performance of Node.js.
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
commit-queue-squash
Add this label to instruct the Commit Queue to squash all the PR commits into the first one.
commit-queue
Add this label to land a pull request using GitHub Actions.
labels
Dec 8, 2022
addaleax
approved these changes
Dec 8, 2022
nodejs-github-bot
removed
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Dec 8, 2022
Landed in 2b9d3b2 |
5 tasks
This was referenced Dec 10, 2022
ErickWendel
pushed a commit
to ErickWendel/node
that referenced
this pull request
Dec 12, 2022
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark. PR-URL: nodejs#45746 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
targos
pushed a commit
that referenced
this pull request
Dec 12, 2022
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark. PR-URL: #45746 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
targos
pushed a commit
that referenced
this pull request
Dec 13, 2022
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark. PR-URL: #45746 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Dec 30, 2022
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark. PR-URL: #45746 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Dec 30, 2022
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark. PR-URL: #45746 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Jan 3, 2023
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark. PR-URL: #45746 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Jan 4, 2023
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark. PR-URL: #45746 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Jan 5, 2023
Also remove the require-cachable.js benchmarks because now all builtin modules are cacheable, it would be comparing oranges to apples when we try to compare the performance of loading all cacheable modules in different Node.js binaries since the set of modules are just different. Comparison of startup performance that involves loading of the long-standing, stable builtins is already covered by the require-builtins benchmark. PR-URL: #45746 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
benchmark
Issues and PRs related to the benchmark subsystem.
commit-queue-squash
Add this label to instruct the Commit Queue to squash all the PR commits into the first one.
performance
Issues and PRs related to the performance of Node.js.
review wanted
PRs that need reviews.
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.
benchmark: make benchmarks runnable in older versions of Node.js
Also remove the require-cachable.js benchmarks because now all builtin
modules are cacheable, it would be comparing oranges to apples when
we try to compare the performance of loading all cacheable modules
in different Node.js binaries since the set of modules are just
different. Comparison of startup performance that involves loading
of the long-standing, stable builtins is already covered by the
require-builtins benchmark.
benchmark: rewrite the startup performance benchmark
The previous benchmark was inaccurate in several ways:
loading in parallel in 1 second" which is prone to wrong
interpretations. It's also not typical for users to spin up >20
workers/child processes in parallel, which was what the benchmark
usually ended up doing. The parallelism can also be greatly affected
by system configurations.
greatly depending on system configurations, but it was inevitable
for the benchmark to load Node.js multiple times to reduce the
influence of fluctuations.
This patch rewrites the benchmark so that:
in serial" which is generally more in line with how other benchmarks
are written and with the figures one gets from doing something like
time node index.js
orhyperfine 'node index.js'
statistical outliers, so that we get more meaningful figures when
trying to compare the startup performance of different Node.js
binaries.