Skip to content

Commit

Permalink
[Doc] Add docs for resource usage stats (#5408)
Browse files Browse the repository at this point in the history
* Add documentation for resource usage stats

Signed-off-by: Bharathwaj G <[email protected]>

* Documentation changes to include resource usage stats

Signed-off-by: Bharathwaj G <[email protected]>

* addressinc omments

Signed-off-by: Bharathwaj G <[email protected]>

---------

Signed-off-by: Bharathwaj G <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
  • Loading branch information
bharath-techie and kolchfa-aws authored Jan 25, 2024
1 parent 8c228f9 commit a3f0646
Showing 1 changed file with 19 additions and 0 deletions.
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 @@ adaptive_selection | Statistics about adaptive replica selection, which selects
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 | Node-level resource usage statistics, such as CPU and JVM memory.

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 @@ -708,6 +709,13 @@ Select the arrow to view the example response.
},
"enabled" : false,
"enforced" : false
},
"resource_usage_stats": {
"nxLWtMdXQmWA-ZBVWU8nwA": {
"timestamp": 1698401391000,
"cpu_utilization_percent": "0.1",
"memory_utilization_percent": "3.9"
}
}
}
}
Expand Down Expand Up @@ -761,6 +769,8 @@ http.total_opened | Integer | The total number of HTTP connections the node has
[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 for the node.


### `indices`

Expand Down Expand Up @@ -1192,6 +1202,15 @@ total_rejections_breakup_shadow_mode.throughput_degradation_limits | Integer | T
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 within the time period configured in the `node.resource.tracker.global_cpu_usage.window_duration` setting.
memory_utilization_percent | Float | The node JVM memory usage statistics within the time period configured in the `node.resource.tracker.global_jvmmp.window_duration` setting.

## 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

0 comments on commit a3f0646

Please sign in to comment.