http2: adjust stream buffer size#16445
Closed
apapirovski wants to merge 1 commit intonodejs:masterfrom
Closed
Conversation
addaleax
approved these changes
Oct 24, 2017
jasnell
reviewed
Oct 24, 2017
src/node_http2.cc
Outdated
Member
There was a problem hiding this comment.
I'm good with removing this. Just fwiw, I included this to follow a pattern used elsewhere (tho slightly differently)
e.g. https://github.com/nodejs/node/blob/master/src/tls_wrap.cc#L675
jasnell
approved these changes
Oct 24, 2017
Member
jasnell
left a comment
There was a problem hiding this comment.
Awesome.. I love it when other people cross items off my todo list :-) ... LGTM!
cjihrig
approved these changes
Oct 24, 2017
Contributor
Author
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket.
a704c3c to
83b77a9
Compare
Contributor
Author
|
Landed in 3690a72 |
apapirovski
added a commit
that referenced
this pull request
Oct 27, 2017
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket. PR-URL: #16445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
gibfahn
pushed a commit
that referenced
this pull request
Oct 30, 2017
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket. PR-URL: #16445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
gibfahn
pushed a commit
that referenced
this pull request
Oct 30, 2017
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket. PR-URL: #16445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
gibfahn
pushed a commit
that referenced
this pull request
Oct 31, 2017
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket. PR-URL: #16445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Merged
Qard
pushed a commit
to ayojs/ayo
that referenced
this pull request
Nov 2, 2017
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket. PR-URL: nodejs/node#16445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Qard
pushed a commit
to ayojs/ayo
that referenced
this pull request
Nov 2, 2017
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket. PR-URL: nodejs/node#16445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax
pushed a commit
to ayojs/ayo
that referenced
this pull request
Dec 7, 2017
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket. PR-URL: nodejs/node#16445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
So I have no idea if there was reasoning for this originally — and if there was feel free to let me know and I'll close — but the current
kAllocBufferSizeis just a tad too small for fully efficient writes given default window size & frame size.64 * 1024will be 35 bytes smaller than the full default window size due to the 4 frame headers that are included.Obviously this all goes out the window with different frame sizes & window sizes but seems to make sense to at least sort of optimize for the default here.
Here's a log that shows what was happening before the change (note the last few lines)
This also removes the seemingly unused
size_t recommendedinAllocateSendand the constant it usesSEND_BUFFER_RECOMMENDED_SIZE. Again, let me know if this is here for some future functionality that hasn't been added yet.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
http2