-
Notifications
You must be signed in to change notification settings - Fork 257
Enhance sinks to make them batchable #469
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
Conversation
Signed-off-by: Xintao <[email protected]>
aed81e8
to
c6d8441
Compare
Cool, how does grpcio benchmark say? |
Signed-off-by: Xintao <[email protected]>
8ee0b20
to
182dff0
Compare
The updated results are in the description. BTW, I read the benchmark code, the client does not use the |
If adapted to send_all, how does it performs? Since now std::future is used, async/await is the preferred style. It will be less useful if the optimization can't work with that. |
Above is the background. The semantics of |
Can you give an example about how to utilize the optimization with async/await? |
The previous benchmark in grpc-rs did not implement the |
Signed-off-by: Xintao <[email protected]>
fc18f28
to
f77508a
Compare
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]>
f847062
to
b90daf3
Compare
rest LGTM. |
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]>
6f2ddbf
to
8926509
Compare
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]>
630e3d6
to
c133a57
Compare
Signed-off-by: Xintao <[email protected]>
80f6eda
to
697da61
Compare
Signed-off-by: Xintao <[email protected]>
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.
Rest LGTM
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]>
d4fcc2b
to
aa12149
Compare
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]>
ac274f8
to
94a5552
Compare
Signed-off-by: Xintao <[email protected]>
94a5552
to
a60ad06
Compare
Signed-off-by: Xintao <[email protected]>
close #415
Optimize
send_all
using sink in grpc-rs. By buffering the message to be sent to determine whether there is still message in the stream, and add thebuffer_hint
flag to indicate follow-up messages.After a simple test, this does improve the QPS by 50% when you use
send_all
method.Related test code: https://github.com/hunterlxt/grpc-rs/blob/xt/bench-sink-over-master/tests-and-examples/examples/hello_world/client.rs
Additional benchmark with standard grpc driver (before vs after)