Skip to content
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

[Doc] Add docs for resource usage stats #5408

Merged
merged 6 commits into from
Jan 25, 2024
Merged
Changes from 4 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
19 changes: 19 additions & 0 deletions _api-reference/nodes-apis/nodes-stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
script_cache | Statistics about script cache.
indexing_pressure | Statistics about the node's indexing pressure.
shard_indexing_pressure | Statistics about shard indexing pressure.
resource_usage_stats | Resource usage statistics of nodes, such as CPU and JVM
bharath-techie marked this conversation as resolved.
Show resolved Hide resolved

To filter the information returned for the `indices` metric, you can use specific `index_metric` values. You can use these only when you use the following query types:

Expand Down Expand Up @@ -676,6 +677,13 @@
},
"enabled" : false,
"enforced" : false
},
"resource_usage_stats": {
"nxLWtMdXQmWA-ZBVWU8nwA": {
"timestamp": 1698401391000,
"cpu_utilization_percent": "0.1",

Check failure on line 684 in _api-reference/nodes-apis/nodes-stats.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: cpu. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: cpu. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_api-reference/nodes-apis/nodes-stats.md", "range": {"start": {"line": 684, "column": 12}}}, "severity": "ERROR"}
"memory_utilization_percent": "3.9"
}
}
}
}
Expand Down Expand Up @@ -729,6 +737,8 @@
[indexing_pressure](#indexing_pressure) | Object | Statistics related to the node's indexing pressure.
[shard_indexing_pressure](#shard_indexing_pressure) | Object | Statistics related to indexing pressure at the shard level.
[search_backpressure]({{site.url}}{{site.baseurl}}/opensearch/search-backpressure#search-backpressure-stats-api) | Object | Statistics related to search backpressure.
[resource_usage_stats](#resource_usage_stats) | Object | Statistics related to resource usage stats for the node.
bharath-techie marked this conversation as resolved.
Show resolved Hide resolved


### `indices`

Expand Down Expand Up @@ -1143,6 +1153,15 @@
enabled | Boolean | Specifies whether the shard indexing pressure feature is turned on for the node.
enforced | Boolean | If true, the shard indexing pressure runs in enforced mode (there are rejections). If false, the shard indexing pressure runs in shadow mode (there are no rejections, but statistics are recorded and can be retrieved in the `total_rejections_breakup_shadow_mode` object). Only applicable if shard indexing pressure is enabled.

### `resource_usage_stats`
The `resource_usage_stats` object contains the resource usage statistics. Each entry is specified by the node ID and has the following properties.

Field | Field type | Description
:--- |:-----------| :---
timestamp | Integer | The last refresh time for the resource usage statistics, in milliseconds since the epoch.
cpu_utilization_percent | Float | Statistics for the average CPU usage of OpenSearch process in the period configured in the setting `node.resource.tracker.global_cpu_usage.window_duration`.
bharath-techie marked this conversation as resolved.
Show resolved Hide resolved
memory_utilization_percent | Float | Statistics for the JVM memory usage on the node in the period configured in the setting `node.resource.tracker.global_jvmmp.window_duration`
bharath-techie marked this conversation as resolved.
Show resolved Hide resolved

## Concurrent segment search

Starting in OpenSearch 2.10, [concurrent segment search]({{site.url}}{{site.baseurl}}/search-plugins/concurrent-segment-search/) allows each shard-level request to search segments in parallel during the query phase. If you [enable the experimental concurrent segment search feature flag]({{site.url}}{{site.baseurl}}/search-plugins/concurrent-segment-search#enabling-the-feature-flag), the Nodes Stats API response will contain several additional fields with statistics about slices (units of work executed by a thread). For the descriptions of those fields, see [Index Stats API]({{site.url}}{{site.baseurl}}/api-reference/index-apis/stats#concurrent-segment-search).
Expand Down