Skip to content

benchmark: add fs warmup to writefile-promises #59215

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brunocroh
Copy link

Add file system warmup to benchmark writefile-promises.js

$ node benchmark/fs/writefile-promises.js

fs/writefile-promises.js concurrent=1 size=2 encodingType="buf" duration=5: 15,522.893788642756
fs/writefile-promises.js concurrent=10 size=2 encodingType="buf" duration=5: 18,385.621401001084
fs/writefile-promises.js concurrent=1 size=1024 encodingType="buf" duration=5: 15,941.96183276004
fs/writefile-promises.js concurrent=10 size=1024 encodingType="buf" duration=5: 17,732.973306593143
fs/writefile-promises.js concurrent=1 size=65535 encodingType="buf" duration=5: 11,277.442195395763
fs/writefile-promises.js concurrent=10 size=65535 encodingType="buf" duration=5: 14,349.130016160936
fs/writefile-promises.js concurrent=1 size=1048576 encodingType="buf" duration=5: 3,471.3987375777265
fs/writefile-promises.js concurrent=10 size=1048576 encodingType="buf" duration=5: 2,374.0714178791595
fs/writefile-promises.js concurrent=1 size=2 encodingType="asc" duration=5: 12,540.450307182413
fs/writefile-promises.js concurrent=10 size=2 encodingType="asc" duration=5: 17,260.661370311405
fs/writefile-promises.js concurrent=1 size=1024 encodingType="asc" duration=5: 16,232.128065269568
fs/writefile-promises.js concurrent=10 size=1024 encodingType="asc" duration=5: 19,247.61233160076
fs/writefile-promises.js concurrent=1 size=65535 encodingType="asc" duration=5: 11,660.957947695404
fs/writefile-promises.js concurrent=10 size=65535 encodingType="asc" duration=5: 13,294.157001400614
fs/writefile-promises.js concurrent=1 size=1048576 encodingType="asc" duration=5: 3,034.2808985541838
fs/writefile-promises.js concurrent=10 size=1048576 encodingType="asc" duration=5: 3,600.4345035710544
fs/writefile-promises.js concurrent=1 size=2 encodingType="utf" duration=5: 17,691.77367306544
fs/writefile-promises.js concurrent=10 size=2 encodingType="utf" duration=5: 20,191.29448264835
fs/writefile-promises.js concurrent=1 size=1024 encodingType="utf" duration=5: 17,717.87765208418
fs/writefile-promises.js concurrent=10 size=1024 encodingType="utf" duration=5: 20,257.297789176133
fs/writefile-promises.js concurrent=1 size=65535 encodingType="utf" duration=5: 9,726.079463331651
fs/writefile-promises.js concurrent=10 size=65535 encodingType="utf" duration=5: 16,046.031875145927
fs/writefile-promises.js concurrent=1 size=1048576 encodingType="utf" duration=5: 1,697.195657894629
fs/writefile-promises.js concurrent=10 size=1048576 encodingType="utf" duration=5: 2,118.778787994161

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. fs Issues and PRs related to the fs subsystem / file system. labels Jul 25, 2025
@brunocroh
Copy link
Author

@RafaelGSS Could you please have a look at this?

Also, one question: what do you think about removing the 65535 size from the benchmark suite? As you mentioned earlier, I think it's unnecessary and makes the benchmark take more time than needed.

  size: [2, 1024, 65535, 1024 * 1024],

@RafaelGSS
Copy link
Member

@RafaelGSS Could you please have a look at this?

Also, one question: what do you think about removing the 65535 size from the benchmark suite? As you mentioned earlier, I think it's unnecessary and makes the benchmark take more time than needed.

  size: [2, 1024, 65535, 1024 * 1024],

Yes, let's do this in another PR. Considering the results we got from this benchmark, removing the 2 from the size might be better.

@RafaelGSS RafaelGSS added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 25, 2025
@RafaelGSS RafaelGSS added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 26, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 27, 2025
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/59215
✘  Failed to get collaborator info from nodejs/node/README.md
Error: Couldn't find #### TSC voting members in the README
    at parseCollaborators (file:///opt/hostedtoolcache/node/22.17.1/x64/lib/node_modules/@node-core/utils/lib/collaborators.js:83:11)
    at getCollaborators (file:///opt/hostedtoolcache/node/22.17.1/x64/lib/node_modules/@node-core/utils/lib/collaborators.js:60:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async PRData.getCollaborators (file:///opt/hostedtoolcache/node/22.17.1/x64/lib/node_modules/@node-core/utils/lib/pr_data.js:74:26)
    at async Promise.all (index 0)
    at async PRData.getAll (file:///opt/hostedtoolcache/node/22.17.1/x64/lib/node_modules/@node-core/utils/lib/pr_data.js:58:5)
    at async getMetadata (file:///opt/hostedtoolcache/node/22.17.1/x64/lib/node_modules/@node-core/utils/components/metadata.js:18:3)
    at async main (file:///opt/hostedtoolcache/node/22.17.1/x64/lib/node_modules/@node-core/utils/components/git/land.js:204:22)
https://github.com/nodejs/node/actions/runs/16554712983

@nodejs-github-bot nodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Jul 27, 2025
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-failed An error occurred while landing this pull request using GitHub Actions. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants