-
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
http2: shrink memory to match read data #26201
Closed
Closed
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
Perform a shrinking `Realloc()` so that less data is used for HTTP2 reads.
addaleax
added
http2
Issues or PRs related to the http2 subsystem.
lts-watch-v8.x
labels
Feb 19, 2019
nodejs-github-bot
added
c++
Issues and PRs that require attention from people who are familiar with C++.
dont-land-on-v6.x
labels
Feb 19, 2019
cjihrig
approved these changes
Feb 19, 2019
2 tasks
CI failures should be fixed, new CI: https://ci.nodejs.org/job/node-test-pull-request/20896/ |
BridgeAR
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Feb 20, 2019
Resume CI: https://ci.nodejs.org/job/node-test-pull-request/20922/ (:heavy_check_mark:) (This needs another review, cc @nodejs/http2.) |
jasnell
approved these changes
Feb 21, 2019
mcollina
approved these changes
Feb 21, 2019
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.
LGTM
Landed in 83e1b97 |
addaleax
added a commit
that referenced
this pull request
Feb 21, 2019
Perform a shrinking `Realloc()` so that less data is used for HTTP2 reads. PR-URL: #26201 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
added a commit
that referenced
this pull request
Feb 21, 2019
Perform a shrinking `Realloc()` so that less data is used for HTTP2 reads. PR-URL: #26201 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Merged
rvagg
pushed a commit
that referenced
this pull request
Feb 28, 2019
Perform a shrinking `Realloc()` so that less data is used for HTTP2 reads. PR-URL: #26201 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Aug 15, 2019
Lazily allocate `ArrayBuffer`s for the contents of DATA frames. Creating `ArrayBuffer`s is, sadly, not a cheap operation with V8. This is part of performance improvements to mitigate CVE-2019-9513. Together with the previous commit, these changes improve throughput in the adversarial case by about 100 %, and there is little more that we can do besides artificially limiting the rate of incoming metadata frames (i.e. after this patch, CPU usage is virtually exclusively in libnghttp2). [This backport also applies changes from 83e1b97 and required some manual work due to the lack of `AllocatedBuffer` on v10.x.] Refs: #26201 Backport-PR-URL: #29123 PR-URL: #29122 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Aug 15, 2019
Lazily allocate `ArrayBuffer`s for the contents of DATA frames. Creating `ArrayBuffer`s is, sadly, not a cheap operation with V8. This is part of performance improvements to mitigate CVE-2019-9513. Together with the previous commit, these changes improve throughput in the adversarial case by about 100 %, and there is little more that we can do besides artificially limiting the rate of incoming metadata frames (i.e. after this patch, CPU usage is virtually exclusively in libnghttp2). [This backport also applies changes from 83e1b97 and required some manual work due to the lack of `AllocatedBuffer` on v10.x. More work was necessary for v8.x, including copying utilities for `util.h` from more recent Node.js versions.] Refs: #26201 Backport-PR-URL: #29124 PR-URL: #29122 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[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.
c++
Issues and PRs that require attention from people who are familiar with C++.
http2
Issues or PRs related to the http2 subsystem.
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.
Perform a shrinking
Realloc()
so that less data is used for HTTP2 reads.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes