Link Search Menu Expand Document Documentation Menu

Performance analyzer

Performance analyzer is an agent and REST API that allows you to query numerous performance metrics for your cluster, including aggregations of those metrics.

The performance analyzer plugin is installed by default in OpenSearch version 2.0 and higher.

Performance analyzer installation and configuration

The following sections provide the steps for installing and configuring the performance analyzer plugin.

Install performance analyzer

The performance analyzer plugin is included in the installation for Docker and tarball. If you need to install the performance analyzer plugin manually, download the plugin from Maven and install the plugin using the standard plugins install process. Performance analyzer will run on each node in a cluster.

To start the performance analyzer root cause analysis (RCA) agent on a tarball installation, run the following command:

OPENSEARCH_HOME=~/opensearch-2.2.1 OPENSEARCH_JAVA_HOME=~/opensearch-2.2.1/jdk OPENSEARCH_PATH_CONF=~/opensearch-2.2.1/bin ./performance-analyzer-agent-cli

The following command enables the performance analyzer plugin and performance analyzer RCA agent:

curl -XPOST localhost:9200/_plugins/_performanceanalyzer/cluster/config -H 'Content-Type: application/json' -d '{"enabled": true}'

To shut down the performance analyzer RCA agent, run the following command:

kill $(ps aux | grep -i 'PerformanceAnalyzerApp' | grep -v grep | awk '{print $2}')

To disable the performance analyzer plugin, run the following command:

curl -XPOST localhost:9200/_plugins/_performanceanalyzer/cluster/config -H 'Content-Type: application/json' -d '{"enabled": false}'

To uninstall the performance analyzer plugin, run the following command:

bin/opensearch-plugin remove opensearch-performance-analyzer

Configure performance analyzer

To configure the performance analyzer plugin, you will need to edit the configuration file in the config/opensearch-performance-analyzer/ directory. Make sure to uncomment the line #webservice-bind-host and set it to You can reference the following example configuration.

# ======================== OpenSearch performance analyzer plugin config =========================

# NOTE: this is an example for Linux. Please modify the config accordingly if you are using it under other OS.

# WebService bind host; default to all interfaces
webservice-bind-host =

# Metrics data location
metrics-location = /dev/shm/performanceanalyzer/

# Metrics deletion interval (minutes) for metrics data.
# Interval should be between 1 to 60.
metrics-deletion-interval = 1

# If set to true, the system cleans up the files behind it. So at any point, we should expect only 2
# metrics-db-file-prefix-path files. If set to false, no files are cleaned up. This can be useful, if you are archiving
# the files and wouldn't like for them to be cleaned up.
cleanup-metrics-db-files = true

# WebService exposed by App's port
webservice-listener-port = 9600

# Metric DB File Prefix Path location
metrics-db-file-prefix-path = /tmp/metricsdb_

https-enabled = false

#Setup the correct path for certificates
#certificate-file-path = specify_path

#private-key-file-path = specify_path

# Plugin Stats Metadata file name, expected to be in the same location
plugin-stats-metadata = plugin-stats-metadata

# Agent Stats Metadata file name, expected to be in the same location
agent-stats-metadata = agent-stats-metadata

To start the performance analyzer RCA agent, run the following command.

OPENSEARCH_HOME=~/opensearch-2.2.1 OPENSEARCH_JAVA_HOME=~/opensearch-2.2.1/jdk OPENSEARCH_PATH_CONF=~/opensearch-2.2.1/bin ./performance-analyzer-agent-cli


Performance analyzer uses /dev/shm for temporary storage. During heavy workloads on a cluster, performance analyzer can use up to 1 GB of space.

Docker, however, has a default /dev/shm size of 64 MB. To change this value, you can use the docker run --shm-size 1gb flag or a similar setting in Docker Compose.

If you’re not using Docker, check the size of /dev/shm using df -h. The default value is probably plenty, but if you need to change its size, add the following line to /etc/fstab:

tmpfs /dev/shm tmpfs defaults,noexec,nosuid,size=1G 0 0

Then remount the file system:

mount -o remount /dev/shm


Performance analyzer supports encryption in transit for requests. It currently does not support client or server authentication for requests. To enable encryption in transit, edit in your $OPENSEARCH_HOME directory.

vi $OPENSEARCH_HOME/config/opensearch-performance-analyzer/

Change the following lines to configure encryption in transit. Note that certificate-file-path must be a certificate for the server, not a root certificate authority (CA).

https-enabled = true

#Setup the correct path for certificates
certificate-file-path = specify_path

private-key-file-path = specify_path

Enable performance analyzer for RPM/YUM installations

If you installed OpenSearch from an RPM distribution, you can start and stop performance analyzer with systemctl.

# Start OpenSearch Performance Analyzer
sudo systemctl start opensearch-performance-analyzer.service
# Stop OpenSearch Performance Analyzer
sudo systemctl stop opensearch-performance-analyzer.service

Example API query and response

The following is an example API query:

GET localhost:9600/_plugins/_performanceanalyzer/metrics/units

The following is an example response:


Root cause analysis

The root cause analysis (RCA) framework uses the information from performance analyzer to inform administrators of the root cause of performance and availability issues that their clusters might be experiencing.

Enable the RCA framework

To enable the RCA framework, run the following command:

curl -XPOST http://localhost:9200/_plugins/_performanceanalyzer/rca/cluster/config -H 'Content-Type: application/json' -d '{"enabled": true}'

If you encounter the curl: (52) Empty reply from server response, run the following command to enable RCA:

curl -XPOST https://localhost:9200/_plugins/_performanceanalyzer/rca/cluster/config -H 'Content-Type: application/json' -d '{"enabled": true}' -u 'admin:admin' -k

Example API query and response

To request all available RCAs, run the following command:

GET localhost:9600/_plugins/_performanceanalyzer/rca

To request a specific RCA, run the following command:

GET localhost:9600/_plugins/_performanceanalyzer/rca?name=HighHeapUsageClusterRCA

The following is an example response:

  "HighHeapUsageClusterRCA": [{
    "RCA_name": "HighHeapUsageClusterRCA",
    "state": "unhealthy",
    "timestamp": 1587426650942,
    "HotClusterSummary": [{
      "number_of_nodes": 2,
      "number_of_unhealthy_nodes": 1,
      "HotNodeSummary": [{
        "host_address": "",
        "node_id": "JtlEoRowSI6iNpzpjlbp_Q",
        "HotResourceSummary": [{
          "resource_type": "old gen",
          "threshold": 0.65,
          "value": 0.81827232588145373,
          "avg": NaN,
          "max": NaN,
          "min": NaN,
          "unit_type": "heap usage in percentage",
          "time_period_seconds": 600,
          "TopConsumerSummary": [{
              "name": "CACHE_FIELDDATA_SIZE",
              "value": 590702564
              "name": "CACHE_REQUEST_SIZE",
              "value": 28375
              "name": "CACHE_QUERY_SIZE",
              "value": 12687

Performance analyzer and RCA API references

Further documentation on the use of performance analyzer and RCA can be found at the following links:

Table of contents