Skip to content

[#1307] feat(rust): make each thread listen the socket to improve throughput in tonic - #1306

Merged
zuston merged 2 commits into
apache:masterfrom
zuston:fixTry
Nov 10, 2023
Merged

[#1307] feat(rust): make each thread listen the socket to improve throughput in tonic#1306
zuston merged 2 commits into
apache:masterfrom
zuston:fixTry

Conversation

@zuston

@zuston zuston commented Nov 10, 2023

Copy link
Copy Markdown
Member

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

@zuston zuston changed the title feat(rust): make each thread listen the socket to improve throughput in tonic [#1307] feat(rust): make each thread listen the socket to improve throughput in tonic Nov 10, 2023
@zuston

zuston commented Nov 10, 2023

Copy link
Copy Markdown
Member Author

cc @jerqi

@codecov-commenter

codecov-commenter commented Nov 10, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1306 (bb6e1ec) into master (c258076) will increase coverage by 1.01%.
The diff coverage is n/a.

@@             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!

@zuston zuston linked an issue Nov 10, 2023 that may be closed by this pull request
3 tasks
@zuston
zuston merged commit 6823916 into apache:master Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] tonic throughput problems

3 participants