[#1307] feat(rust): make each thread listen the socket to improve throughput in tonic - #1306
Merged
Conversation
Member
Author
|
cc @jerqi |
Codecov Report
@@ Coverage Diff @@
## master #1306 +/- ##
============================================
+ Coverage 53.35% 54.37% +1.01%
Complexity 2690 2690
============================================
Files 410 390 -20
Lines 23590 21230 -2360
Branches 2003 2003
============================================
- Hits 12587 11543 -1044
+ Misses 10229 8984 -1245
+ Partials 774 703 -71 see 20 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
roryqi
approved these changes
Nov 10, 2023
3 tasks
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.
What changes were proposed in this pull request?
Make each grpc service thread listens the socket to improve request throughput.
Why are the changes needed?
I‘m always digging the way to solve the request throughput when the writing concurrency is 400. And then I found the few people talk about this, which makes me confused until I see this grpc/grpc-rust#1405 (comment) .
From this blog https://medium.com/@fujita.tomonori/scalable-server-design-in-rust-with-tokio-4c81a5f350a3,
I try to do this optimization, and then do some terasort test. I found the peek receive data speed from 1.2G/s -> 2.0G/s, it works ! And the latency becomes low. And the whole processing time reduces from 20min -> 8.5min
Does this PR introduce any user-facing change?
No.
How was this patch tested?
No need