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

stream: avoid unnecessary drain for sync stream #50014

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

ronag
Copy link
Member

@ronag ronag commented Oct 2, 2023

We have tried this before but reverted due to:

2868f52
#35926

However, it has quite a significant performance improvement and doesn't actually break the "streams spec". Let's have another look at it.

streams/writable-manywrites.js len=1024 callback='no' writev='no' sync='no' n=100000            ***      7.14 %       ±2.24% ±2.98%  ±3.90%
streams/writable-manywrites.js len=1024 callback='no' writev='no' sync='yes' n=100000            **      4.12 %       ±2.47% ±3.29%  ±4.28%
streams/writable-manywrites.js len=1024 callback='no' writev='yes' sync='no' n=100000           ***      6.89 %       ±2.21% ±2.94%  ±3.84%
streams/writable-manywrites.js len=1024 callback='no' writev='yes' sync='yes' n=100000          ***     10.73 %       ±2.25% ±3.00%  ±3.90%
streams/writable-manywrites.js len=1024 callback='yes' writev='no' sync='no' n=100000           ***      8.46 %       ±2.40% ±3.21%  ±4.23%
streams/writable-manywrites.js len=1024 callback='yes' writev='no' sync='yes' n=100000           **      3.00 %       ±1.86% ±2.49%  ±3.27%
streams/writable-manywrites.js len=1024 callback='yes' writev='yes' sync='no' n=100000          ***      7.99 %       ±4.00% ±5.34%  ±6.99%
streams/writable-manywrites.js len=1024 callback='yes' writev='yes' sync='yes' n=100000         ***      9.51 %       ±5.19% ±6.97%  ±9.20%
streams/writable-manywrites.js len=32768 callback='no' writev='no' sync='no' n=100000           ***      7.11 %       ±2.05% ±2.73%  ±3.55%
streams/writable-manywrites.js len=32768 callback='no' writev='no' sync='yes' n=100000          ***    233.76 %       ±6.96% ±9.35% ±12.37%
streams/writable-manywrites.js len=32768 callback='no' writev='yes' sync='no' n=100000          ***      6.40 %       ±1.06% ±1.42%  ±1.85%
streams/writable-manywrites.js len=32768 callback='no' writev='yes' sync='yes' n=100000         ***    215.94 %       ±4.96% ±6.66%  ±8.79%
streams/writable-manywrites.js len=32768 callback='yes' writev='no' sync='no' n=100000          ***      6.51 %       ±1.51% ±2.01%  ±2.61%
streams/writable-manywrites.js len=32768 callback='yes' writev='no' sync='yes' n=100000         ***    213.41 %       ±3.75% ±5.01%  ±6.57%
streams/writable-manywrites.js len=32768 callback='yes' writev='yes' sync='no' n=100000         ***      5.80 %       ±1.54% ±2.06%  ±2.69%
streams/writable-manywrites.js len=32768 callback='yes' writev='yes' sync='yes' n=100000        ***    194.75 %       ±4.29% ±5.77%  ±7.62%

@ronag ronag added the semver-major PRs that contain breaking changes and should be released in the next major version. label Oct 2, 2023
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 2, 2023
@ronag ronag requested a review from lpinca October 2, 2023 12:27
@ronag ronag added the needs-citgm PRs that need a CITGM CI run. label Oct 2, 2023
@ronag

This comment was marked as outdated.

@ronag ronag force-pushed the drain-sync branch 6 times, most recently from 926e815 to e384e57 Compare October 2, 2023 12:44
@ronag ronag removed the semver-major PRs that contain breaking changes and should be released in the next major version. label Oct 2, 2023
ronag added a commit to nxtedition/node that referenced this pull request Oct 2, 2023
ronag added a commit to nxtedition/node that referenced this pull request Oct 2, 2023
ronag added a commit to nxtedition/node that referenced this pull request Oct 2, 2023
ronag added a commit to nxtedition/node that referenced this pull request Oct 2, 2023
ronag added a commit to nxtedition/node that referenced this pull request Oct 2, 2023
ronag added a commit to nxtedition/node that referenced this pull request Oct 2, 2023
@ronag ronag added request-ci Add this label to start a Jenkins CI on a PR. and removed needs-citgm PRs that need a CITGM CI run. labels 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
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 3, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@ronag
Copy link
Member Author

ronag commented Oct 3, 2023

@mcollina PTAL

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm, clever

@ronag ronag added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 3, 2023
Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

I'm surprised Matteo is unconcerned with this :D

@lpinca
Copy link
Member

lpinca commented 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 557044a into nodejs:main Oct 4, 2023
52 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 557044a

ronag added a commit to nxtedition/node that referenced this pull request Oct 28, 2023
nodejs-github-bot pushed a commit that referenced this pull request Oct 29, 2023
Refs: #50014
PR-URL: #50446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
PR-URL: nodejs#50014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
Refs: nodejs#50014
PR-URL: nodejs#50446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
targos pushed a commit that referenced this pull request Nov 11, 2023
PR-URL: #50014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request Nov 11, 2023
Refs: #50014
PR-URL: #50446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
Refs: #50014
PR-URL: #50446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
debadree25 pushed a commit to debadree25/node that referenced this pull request Apr 15, 2024
PR-URL: nodejs#50014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants