Skip to content
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

fs: improve error performance for fdatasyncSync #49898

Merged
merged 4 commits into from
Oct 4, 2023

Conversation

pluris
Copy link
Contributor

@pluris pluris commented Sep 27, 2023

                                                      confidence improvement accuracy (*)   (**)   (***)
fs/bench_fdatasyncSync.js n=10000 type='existing'            ***      6.39 %       ±1.85% ±2.48%  ±3.25%
fs/bench_fdatasyncSync.js n=10000 type='non-existing'        ***    116.11 %       ±6.89% ±9.21% ±12.08%

Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 2 comparisons, you can thus expect the following amount of false-positive results:
  0.10 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.02 false positives, when considering a   1% risk acceptance (**, ***),
  0.00 false positives, when considering a 0.1% risk acceptance (***)

Refs: nodejs/performance#106

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Sep 27, 2023
src/node_file.cc Outdated Show resolved Hide resolved
@anonrig anonrig added request-ci Add this label to start a Jenkins CI on a PR. needs-benchmark-ci PR that need a benchmark CI run. performance Issues and PRs related to the performance of Node.js. labels Sep 27, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 27, 2023
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should introduce a seemingly new implementation by copying and repeating the original implementation & moving code to a new JS file which makes git blame harder to use. See #49593 (comment)

@anonrig
Copy link
Member

anonrig commented Sep 30, 2023

Hey @pluris can you rebase this pull request? You'll see that sync.js file is now removed and merged into lib/fs.js

@pluris pluris force-pushed the perf/fdatasync branch 2 times, most recently from 358c67e to 78b27c0 Compare October 1, 2023 16:03
@pluris
Copy link
Contributor Author

pluris commented Oct 1, 2023

@anonrig I rebased and applied #49913.

@anonrig
Copy link
Member

anonrig commented Oct 1, 2023

@anonrig I rebased and applied #49913.

Can you re-add the benchmark?

@pluris
Copy link
Contributor Author

pluris commented Oct 1, 2023

@anonrig I updated the description.

                                                      confidence improvement accuracy (*)   (**)   (***)
fs/bench_fdatasyncSync.js n=10000 type='existing'                     1.12 %       ±1.51% ±2.01%  ±2.62%
fs/bench_fdatasyncSync.js n=10000 type='non-existing'        ***    109.42 %       ±6.13% ±8.19% ±10.73%

Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 2 comparisons, you can thus expect the following amount of false-positive results:
  0.10 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.02 false positives, when considering a   1% risk acceptance (**, ***),
  0.00 false positives, when considering a 0.1% risk acceptance (***)

@anonrig
Copy link
Member

anonrig commented Oct 1, 2023

The benchmark you're running doesn't exist in main or in your pull request. Can you add the file to your pull request? :-) @pluris

@pluris
Copy link
Contributor Author

pluris commented Oct 1, 2023

@anonrig Oh, sorry. I added it again.
I think I did something wrong during the rebase process. 😅

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 1, 2023
@anonrig anonrig added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Oct 1, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 1, 2023
@nodejs-github-bot
Copy link
Collaborator

@pluris
Copy link
Contributor Author

pluris commented Oct 1, 2023

Oops, there was a part where the condition check was missing, so I modified it again and updated the benchmark.

@pluris
Copy link
Contributor Author

pluris commented Oct 2, 2023

@joyeecheung GetValidatedFd() has also been removed here, as described in #49880 (explanation).

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 2, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 2, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 3, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 4, 2023
@nodejs-github-bot nodejs-github-bot merged commit f7a160d into nodejs:main Oct 4, 2023
55 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in f7a160d

alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
PR-URL: nodejs#49898
Refs: nodejs/performance#106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@pluris pluris deleted the perf/fdatasync branch November 8, 2023 02:24
targos pushed a commit that referenced this pull request Nov 11, 2023
PR-URL: #49898
Refs: nodejs/performance#106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
debadree25 pushed a commit to debadree25/node that referenced this pull request Apr 15, 2024
PR-URL: nodejs#49898
Refs: nodejs/performance#106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
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. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. lib / src Issues and PRs related to general changes in the lib or src directory. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. performance Issues and PRs related to the performance of Node.js.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants