-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[GRPC] Optimize gRPC transport thread management for improved throughput #19278
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: Karen Xu <[email protected]>
Signed-off-by: Karen Xu <[email protected]>
|
❌ Gradle check result for a3053c9: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
a3053c9 to
6eeb4e8
Compare
Signed-off-by: Karen X <[email protected]>
|
❌ Gradle check result for 83ca58b: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Karen Xu <[email protected]>
|
❌ Gradle check result for b0742bc: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Karen Xu <[email protected]>
|
❕ Gradle check result for aa9d758: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #19278 +/- ##
============================================
+ Coverage 72.86% 73.01% +0.15%
- Complexity 69951 70089 +138
============================================
Files 5681 5681
Lines 321436 321457 +21
Branches 46484 46486 +2
============================================
+ Hits 234204 234715 +511
+ Misses 68268 67811 -457
+ Partials 18964 18931 -33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: karenx <[email protected]>
8dd6ed7 to
52d12f6
Compare
Signed-off-by: Karen X <[email protected]>
|
❕ Gradle check result for e876aae: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Signed-off-by: Karen X <[email protected]>
msfroh
left a comment
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 think this makes sense.
I don't 100% understand the implication of adding the additional executors, but I can see how splitting worker assignment, doing the work, and writing the gRPC response across different threadpools helps.
|
❕ Gradle check result for 19c1e09: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
There isn't a strong basis for setting to default 2 * cpu_cores as the default value, but I thought it would make sense for it to be greater than the number of workers (which is sent to the num cpu_cores), since it probably takes longer for gRPC to parse the request than it does to accept one (as worker threads do). Since it is configurable, I suppose users can set this to fit their query patterns more if needed. |
|
❌ Gradle check result for c41ad7f: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 68aa440: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
68aa440 to
228a83c
Compare
Signed-off-by: Karen X <[email protected]>
|
❌ Gradle check result for 1077157: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Karen X <[email protected]>
|
❕ Gradle check result for 5048d9c: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
…put (opensearch-project#19278) * server optimization Signed-off-by: Karen Xu <[email protected]> * readme Signed-off-by: Karen Xu <[email protected]> * fix tests Signed-off-by: Karen Xu <[email protected]> * spotless Signed-off-by: Karen Xu <[email protected]> * code cov Signed-off-by: karenx <[email protected]> * use FixedExecutorBuilder Signed-off-by: karenx <[email protected]> * fix typo Signed-off-by: karenx <[email protected]> * add javadocs and remove duplicate tests Signed-off-by: karenx <[email protected]> --------- Signed-off-by: Karen Xu <[email protected]> Signed-off-by: Karen X <[email protected]> Signed-off-by: karenx <[email protected]> Co-authored-by: karenx <[email protected]>
Description
Implements proposed changes #19277 to optimize the GRPC server for higher throughput.
Example
Before (Blocking Event Loops)
After (Dedicated Thread Pools)
Related Issues
Resolves #19277
Check List
grpc.netty.executor_countsetting to GRPC documentation documentation-website#10937By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.