-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Migrate gRPC transport executor to ForkJoinPool #19685
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
base: main
Are you sure you want to change the base?
Migrate gRPC transport executor to ForkJoinPool #19685
Conversation
42def60 to
cb0269f
Compare
|
❌ Gradle check result for cb0269f: 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: yoonjungeun1 <[email protected]>
Signed-off-by: yoonjungeun1 <[email protected]>
cb0269f to
32618f4
Compare
|
❌ Gradle check result for 32618f4: 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? |
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.
Thanks for taking this on!
| - Onboarding new maven snapshots publishing to s3 ([#19619](https://github.com/opensearch-project/OpenSearch/pull/19619)) | ||
| - Remove MultiCollectorWrapper and use MultiCollector in Lucene instead ([#19595](https://github.com/opensearch-project/OpenSearch/pull/19595)) | ||
| - Change implementation for `percentiles` aggregation for latency improvement ([#19648](https://github.com/opensearch-project/OpenSearch/pull/19648)) | ||
| - Migrate gRPC transport executor from FixedExecutorBuilder to ForkJoinPoolExecutorBuilder for improved performance ([#19370](https://github.com/opensearch-project/OpenSearch/issues/19370)) |
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.
| - Migrate gRPC transport executor from FixedExecutorBuilder to ForkJoinPoolExecutorBuilder for improved performance ([#19370](https://github.com/opensearch-project/OpenSearch/issues/19370)) | |
| - Migrate gRPC transport executor from FixedExecutorBuilder to ForkJoinPoolExecutorBuilder for improved performance ([#19685](https://github.com/opensearch-project/OpenSearch/issues/19685)) |
| * | ||
| * @param settings The node settings | ||
| * @param threadPool The thread pool | ||
| * @param settings The node settings |
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.
Could you run ./gradlew spotlessApply to remove all the formatting changes in this PR?
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.
./gradlew precommit can also be run locally to ensure the Gradle Check CI passes on the PR before pushing
| // Create a ThreadPool with the gRPC executor | ||
| Settings settings = Settings.builder().put("node.name", "test-node").put("grpc.netty.executor_count", 4).build(); | ||
| ExecutorBuilder<?> grpcExecutorBuilder = new FixedExecutorBuilder(settings, "grpc", 4, 1000, "thread_pool.grpc"); | ||
| ExecutorBuilder<?> grpcExecutorBuilder = new ForkJoinPoolExecutorBuilder("grpc", 4, "thread_pool.grpc"); |
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.
Could you run start a local cluster, then run this API and share the output to ensure this change is working as expected?
https://github.com/opensearch-project/OpenSearch/blob/main/modules/transport-grpc/README.md#thread-pool-monitoring
Description
This PR migrates the gRPC transport executor from
FixedExecutorBuildertoForkJoinPoolExecutorBuilderto improve performance through work-stealing and better load balancing.GrpcPlugin.javato useForkJoinPoolExecutorBuilderinstead ofFixedExecutorBuilderRelated Issues
Resolves #19370
Check List
By 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.