Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@

- `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.

### Fork-join thread pool
**Introduced 3.2**
{: .label .label-purple }

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.

Check failure on line 68 in _install-and-configure/configuring-opensearch/thread-pool-settings.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: jVector. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: jVector. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_install-and-configure/configuring-opensearch/thread-pool-settings.md", "range": {"start": {"line": 68, "column": 314}}}, "severity": "ERROR"}

Fork-join 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. Typically, this value 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 the asynchronous mode for fork-join pool scheduling.
- `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.


## Example configurations

To configure a fixed thread pool, update the configuration file as follows:
Expand All @@ -84,6 +97,15 @@
```
{% include copy.html %}

To configure a fork-join thread pool, update the configuration file as follows:

```yaml
thread_pool:
fork_join:
parallelism: 8
```
{% include copy.html %}

To set a custom processor count, update the configuration file as follows:

```yaml
Expand Down
Loading