-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
transport: when using write buffer pooling, use input size instead of size*2 #6983
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #6983 +/- ##
==========================================
+ Coverage 82.14% 82.32% +0.18%
==========================================
Files 296 296
Lines 31452 31451 -1
==========================================
+ Hits 25835 25891 +56
+ Misses 4543 4493 -50
+ Partials 1074 1067 -7
|
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.
I'm fine with this change, but then we need to change the docstring in grpc.[With]WriteBufferSize
to remove the bit about allocating double for historical reasons.
This reverts commit b7693f2.
+@zasweq for a second review. |
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
This is a minor change to fix an inconsistency in #6309
It seems in the past, for unknown reasons (see comment), the write buffer would be allocated to 2x the input size. It's been fixed since, but is still 2x the size for the shared buffer.
Edit: it seems like the reasons aren't really unknown, the buffer allocation was 2x the size to keep syscalls low. If syscalls become a performance issue, the calling code is able to specify a
WriteBufferSize
that is larger. We shouldn't be automatcally 2x-ing the buffer size callers pass in.RELEASE NOTES:
Testing
Ran the same command from the original PR (minus
-shareConnection=false
; it's not a recognized parameter. Added-sharedWriteBuffer=on
and-connections=100
). There are no significant differences.Before change (I just
git revert
):After change:
RELEASE NOTES: