-
Notifications
You must be signed in to change notification settings - Fork 607
Add support for a ForkJoinPool type - 18674 #11023
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?
Conversation
Signed-off-by: Srikanth Padakanti <[email protected]>
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged. Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer. When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review. |
Signed-off-by: Srikanth Padakanti <[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.
Thank you, @srikanthpadakanti! Please see my comments and let me know if you have any questions.
|
||
- `thread_pool.<pool_name>.keep_alive` (Static, time unit): Determines how long idle threads are kept in the pool before being terminated. Threads above the core size are terminated after this period of inactivity. | ||
|
||
### ForkJoin thread pool (New in OpenSearch 3.2) |
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.
### ForkJoin thread pool (New in OpenSearch 3.2) | |
### Fork-join thread pool | |
**Introduced 3.2** | |
{: .label .label-purple } |
|
||
### ForkJoin thread pool (New in OpenSearch 3.2) | ||
|
||
ForkJoin thread pools utilize the Java `ForkJoinPool` to provide efficient parallelism for workloads that benefit from work stealing and task splitting. This is useful for compute-intensive operations, such as those used in OpenSearch jVector for faster index buildup. |
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.
ForkJoin thread pools utilize the Java `ForkJoinPool` to provide efficient parallelism for workloads that benefit from work stealing and task splitting. This is useful for compute-intensive operations, such as those used in OpenSearch jVector for faster index buildup. | |
Fork-join thread pools use the Java `ForkJoinPool` to provide efficient parallelism for workloads that benefit from work stealing and task splitting. This is useful for compute-intensive operations. In OpenSearch, fork-join thread pools support features that rely on parallel computation, such as the [OpenSearch jVector plugin](https://github.com/opensearch-project/opensearch-jvector), which accelerates index builds. |
|
||
ForkJoin thread pools utilize the Java `ForkJoinPool` to provide efficient parallelism for workloads that benefit from work stealing and task splitting. This is useful for compute-intensive operations, such as those used in OpenSearch jVector for faster index buildup. | ||
|
||
ForkJoin thread pools support the following 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.
ForkJoin thread pools support the following settings: | |
Fork-join thread pools support the following settings: |
|
||
ForkJoin thread pools support the following settings: | ||
|
||
- `thread_pool.<pool_name>.parallelism` (Static, integer): Sets the target parallelism level (number of worker threads) for the pool. This typically matches the number of available processors but can be tuned for specific workloads. |
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.
- `thread_pool.<pool_name>.parallelism` (Static, integer): Sets the target parallelism level (number of worker threads) for the pool. This typically matches the number of available processors but can be tuned for specific workloads. | |
- `thread_pool.<pool_name>.parallelism` (Static, integer): Sets the target parallelism level (number of worker threads) for the pool. Typically, this value matches the number of available processors but can be tuned for specific workloads. |
ForkJoin thread pools support the following settings: | ||
|
||
- `thread_pool.<pool_name>.parallelism` (Static, integer): Sets the target parallelism level (number of worker threads) for the pool. This typically matches the number of available processors but can be tuned for specific workloads. | ||
- `thread_pool.<pool_name>.async_mode` (Static, boolean): If set to `true`, uses async mode for ForkJoinPool scheduling. |
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.
- `thread_pool.<pool_name>.async_mode` (Static, boolean): If set to `true`, uses async mode for ForkJoinPool scheduling. | |
- `thread_pool.<pool_name>.async_mode` (Static, Boolean): If set to `true`, uses the asynchronous mode for fork-join pool scheduling. |
|
||
- `thread_pool.<pool_name>.parallelism` (Static, integer): Sets the target parallelism level (number of worker threads) for the pool. This typically matches the number of available processors but can be tuned for specific workloads. | ||
- `thread_pool.<pool_name>.async_mode` (Static, boolean): If set to `true`, uses async mode for ForkJoinPool scheduling. | ||
- `thread_pool.<pool_name>.queue_size` (Static, integer): Sets the size of the submission queue for tasks. Can be set to `-1` for unbounded. |
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.
- `thread_pool.<pool_name>.queue_size` (Static, integer): Sets the size of the submission queue for tasks. Can be set to `-1` for unbounded. | |
- `thread_pool.<pool_name>.queue_size` (Static, integer): Sets the size of the submission queue for tasks. Set this value to `-1` for unbounded queue size. |
- `thread_pool.<pool_name>.async_mode` (Static, boolean): If set to `true`, uses async mode for ForkJoinPool scheduling. | ||
- `thread_pool.<pool_name>.queue_size` (Static, integer): Sets the size of the submission queue for tasks. Can be set to `-1` for unbounded. | ||
|
||
ForkJoin thread pools are currently used in features leveraging parallel computation, such as jVector. |
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.
ForkJoin thread pools are currently used in features leveraging parallel computation, such as jVector. |
|
||
ForkJoin thread pools support the following settings: | ||
|
||
- `thread_pool.<pool_name>.parallelism` (Static, integer): Sets the target parallelism level (number of worker threads) for the pool. This typically matches the number of available processors but can be tuned for specific workloads. |
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.
Do any of these settings have defaults? If so, please list the defaults in the form "Default is <>".
``` | ||
{% include copy.html %} | ||
To configure a ForkJoin thread pool, update the configuration file as follows: |
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.
To configure a ForkJoin thread pool, update the configuration file as follows: | |
To configure a fork-join thread pool, update the configuration file as follows: |
Description
This PR updates the documentation to include information about the new ForkJoinPool thread pool type in OpenSearch. It explains the purpose, configuration options, and use cases for ForkJoinPool, which is now supported as a thread pool type for components that benefit from parallelism, such as jVector.
Issues Resolved
Closes #18664
Closes opensearch-project/OpenSearch#18674
Version
Applies to OpenSearch version 3.2 and later.
Frontend features
N/A (documentation only)
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.