Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

srikanthpadakanti
Copy link
Contributor

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

  • [X ] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

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.

@kolchfa-aws kolchfa-aws added Doc review PR: Doc review in progress backport 3.2 labels Sep 24, 2025
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a 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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Collaborator

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 3.2 Doc review PR: Doc review in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add support for a ForkJoinPool type
2 participants