> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Common Issues to Monitor

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

This page summarizes how to configure and monitor your cluster to prevent issues commonly encountered with:

* [CPU](#cpu)
* [Memory](#memory)
* [Storage and disk I/O](#storage-and-disk-i-o)

## CPU

<Note>
  In our sizing and production guidance, 1 vCPU is considered equivalent to 1 core in the underlying hardware platform.
</Note>

Issues with CPU most commonly arise when there is insufficient CPU to support the scale of the workload.

### CPU planning

Provision enough CPU to support your operational and workload concurrency requirements:

| Category | Recommendations                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CPU      | <ul><li>For cluster stability, Cockroach Labs recommends a *minimum* of **8 vCPUs**, and strongly recommends no fewer than **4 vCPUs** per node. In a cluster with too few CPU resources, foreground client workloads will compete with the cluster's background maintenance tasks.</li><li>Cockroach Labs does not extensively test clusters with more than **64 vCPUs** per node. This is the recommended *maximum* threshold.</li><li>Use larger VMs to handle temporary workload spikes and processing <InternalLink path="understand-hotspots">hotspots</InternalLink>.</li><li>Use connection pooling to manage workload concurrency. The number of **active** connections across all connection pools **should not exceed 4 times the number of vCPUs** in the cluster by a large amount. A connection is "active" when it is actively executing a query. To monitor active connections, use the <InternalLink path="connection-pooling#monitor-active-connections">**Active SQL Statements** graph and `sql.statements.active` metric</InternalLink>. For more details, refer to <InternalLink path="connection-pooling#size-connection-pools">Size connection pools</InternalLink>.</li><li>For additional CPU recommendations, refer to <InternalLink path="recommended-production-settings#sizing">Recommended Production Settings</InternalLink>.</li></ul> |

### CPU monitoring

Monitor possible signs of CPU starvation:

| Parameter                                     | Description                                                                          |
| --------------------------------------------- | ------------------------------------------------------------------------------------ |
| [Service latency](#service-latency)           | The time between when the cluster receives a query and finishes executing the query. |
| [CPU usage](#cpu-usage)                       | The CPU consumption by the CockroachDB node process.                                 |
| [Workload concurrency](#workload-concurrency) | The number of SQL statements being executed on the cluster at the same time.         |
| [LSM health](#lsm-health)                     | The health of the persistent stores.                                                 |
| [Node health](#node-health)                   | The operational status of the nodes.                                                 |

#### Service latency

Degradation in SQL response time is the most common symptom of CPU starvation. It can also be a symptom of [insufficient disk I/O](#storage-and-disk-i-o).

* The <InternalLink path="ui-sql-dashboard#service-latency-sql-99th-percentile">**Service Latency: SQL Statements, 99th percentile**</InternalLink> and <InternalLink path="ui-sql-dashboard#service-latency-sql-90th-percentile">**Service Latency: SQL Statements, 90th percentile**</InternalLink> graphs on the SQL dashboard show the time in nanoseconds between when the cluster <InternalLink path="architecture/sql-layer">receives a query and finishes executing the query</InternalLink>. This time does not include returning results to the client.

If latencies are consistently high, check for:

* High [CPU usage](#cpu-usage).
* An [I/O bottleneck](#disk-iops).

#### CPU usage

<InternalLink path="architecture/storage-layer#compaction">Compaction on the storage layer</InternalLink> uses CPU to run concurrent worker threads.

* The <InternalLink path="ui-overload-dashboard#cpu-utilization">**CPU Utilization**</InternalLink> graph on the Hardware and Overload dashboards shows the CPU consumption by the CockroachDB process, and excludes other processes on the node.

  **Expected values for a healthy cluster**: CPU utilized by CockroachDB should not persistently exceed 80%. Because this metric does not reflect system CPU usage, values above 80% suggest that actual CPU utilization is nearing 100%.

If CPU usage is high, check whether [workload concurrency](#workload-concurrency) is exceeding CPU resources.

By default, the <InternalLink path="architecture/storage-layer">storage engine</InternalLink> uses a compaction concurrency of 3. If you have sufficient IOPS and CPU headroom, you can consider increasing this setting via the `COCKROACH_COMPACTION_CONCURRENCY` environment variable. This may help to reshape the LSM more quickly in <InternalLink path="architecture/storage-layer#inverted-lsms">inverted LSM</InternalLink> scenarios; and it can lead to increased overall performance for some workloads. Cockroach Labs **strongly recommends** testing your workload against non-default values of this setting.

#### Workload concurrency

The number of concurrent active SQL statements should be proportionate to your provisioned CPU.

* The <InternalLink path="ui-sql-dashboard#sql-queries-per-second">**SQL Queries Per Second**</InternalLink> graph on the Overview and SQL dashboards shows the 10-second moving average of `SELECT`, `UPDATE`, `INSERT`, and `DELETE` statements being executed per second on the cluster or node, as well as `Total queries`. The latest QPS value for the cluster is also displayed with the **Queries per second** counter on the Metrics page.

  **Expected values for a healthy cluster**: At any time, the total number of connections actively executing SQL statements should not exceed 4 times the number of vCPUs in the cluster. You can find them in the Active Executions view in the <InternalLink path="ui-statements-page">DB Console</InternalLink> or <InternalLink version="cockroachcloud" path="statements-page">Cloud Console</InternalLink>. You can find the number of open connections in the <InternalLink path="ui-sql-dashboard#open-sql-sessions">DB Console</InternalLink> or <InternalLink version="cockroachcloud" path="metrics-sql#open-sql-sessions">Cloud Console</InternalLink>. For more details on configuring connection pools, see <InternalLink path="connection-pooling#size-connection-pools">Size connection pools</InternalLink>.

If workload concurrency exceeds CPU resources, you will observe:

* High [CPU usage](#cpu-usage).
* Degradation in [SQL response time](#service-latency).
* Over time, an [unhealthy LSM](#lsm-health) and [cluster instability](#node-health).

To prevent issues with workload concurrency, <InternalLink path="recommended-production-settings#sizing">provision sufficient CPU</InternalLink> and use <InternalLink path="recommended-production-settings#connection-pooling">connection pooling</InternalLink> for the workload.

#### LSM health

Issues at the storage layer, including an <InternalLink path="architecture/storage-layer#inverted-lsms">inverted LSM</InternalLink> and high <InternalLink path="architecture/storage-layer#read-amplification">read amplification</InternalLink>, can be observed when <InternalLink path="architecture/storage-layer#compaction">compaction</InternalLink> falls behind due to insufficient CPU or excessively high <InternalLink path="cluster-setup-troubleshooting#excessive-snapshot-rebalance-and-recovery-rates">recovery and rebalance rates</InternalLink>.

* The <InternalLink path="ui-overload-dashboard#io-overload">**IO Overload**</InternalLink> graph on the Overload dashboard shows the health of the <InternalLink path="architecture/storage-layer">persistent stores</InternalLink>, which are implemented as log-structured merge (LSM) trees. Level 0 is the highest level of the LSM tree and consists of files containing the latest data written to the <InternalLink path="cockroach-start#storage-engine">Pebble storage engine</InternalLink>. For more information about LSM levels and how LSMs work, see <InternalLink path="architecture/storage-layer#log-structured-merge-trees">Log-structured Merge-trees</InternalLink>.

  **Expected values for a healthy cluster**: An IO Overload value greater than 1.0 generally indicates an overload in the Pebble LSM tree. High values indicate heavy write load that is causing accumulation of files in level 0. These files are not being compacted quickly enough to lower levels, resulting in a <InternalLink path="architecture/storage-layer#inverted-lsms">misshapen LSM</InternalLink>.

<Note>
  An unhealthy LSM can be caused by other factors, including [under-provisioned storage](#storage-and-disk-i-o). To correlate this symptom with CPU starvation, check for high [CPU usage](#cpu-usage) and excessive [workload concurrency](#workload-concurrency).
</Note>

* The **Read Amplification** graph on the <InternalLink path="ui-storage-dashboard">Storage Dashboard</InternalLink> shows the average number of disk reads per logical SQL statement, also known as the <InternalLink path="architecture/storage-layer#read-amplification">read amplification</InternalLink> factor.

  **Expected values for a healthy cluster**: Read amplification factor should be in the single digits. A value exceeding 50 for 1 hour strongly suggests that the LSM tree has an unhealthy shape.

* The `STORAGE` <InternalLink path="logging-overview#logging-channels">logging channel</InternalLink> indicates an unhealthy LSM with the following:

  * Frequent `compaction` status messages.

  * High-read-amplification warnings, e.g., `sstables (read amplification = 54)`.

If compaction has fallen behind and caused an <InternalLink path="architecture/storage-layer#inverted-lsms">inverted LSM</InternalLink>, throttle your workload concurrency to allow <InternalLink path="architecture/storage-layer#compaction">compaction</InternalLink> to catch up and restore a healthy LSM shape. The number of **active** connections across all connection pools **should not exceed 4 times the number of vCPUs** in the cluster by a large amount. A connection is "active" when it is actively executing a query. To monitor active connections, use the <InternalLink path="connection-pooling#monitor-active-connections">**Active SQL Statements** graph and `sql.statements.active` metric</InternalLink>. If a node is severely impacted, you can <InternalLink path="cockroach-start">start a new node</InternalLink> and then [decommission the problematic node](node-shutdown.html?filters=decommission#remove-nodes). By default, the <InternalLink path="architecture/storage-layer">storage engine</InternalLink> uses a compaction concurrency of 3. If you have sufficient IOPS and CPU headroom, you can consider increasing this setting via the `COCKROACH_COMPACTION_CONCURRENCY` environment variable. This may help to reshape the LSM more quickly in <InternalLink path="architecture/storage-layer#inverted-lsms">inverted LSM</InternalLink> scenarios; and it can lead to increased overall performance for some workloads. Cockroach Labs **strongly recommends** testing your workload against non-default values of this setting.

#### Node health

If [issues at the storage layer](#lsm-health) remain unresolved, affected nodes will eventually become unresponsive.

* The <InternalLink path="ui-cluster-overview-page#node-status">**Node status**</InternalLink> on the Cluster Overview page indicates whether nodes are online (`LIVE`) or have crashed (`SUSPECT` or `DEAD`).

* The `/health` endpoint of the <InternalLink path="cluster-api">Cluster API</InternalLink> returns a `500` error when a node is unhealthy.

* A <InternalLink path="monitoring-and-alerting#node-is-down">Prometheus alert</InternalLink> can notify when a node has been down for 15 minutes or more.

If nodes have shut down, this can also be caused by [insufficient storage capacity](#storage-capacity).

<Note>
  If the cluster becomes unavailable, the DB Console and Cluster API will also become unavailable. You can continue to monitor the cluster via the <InternalLink path="prometheus-endpoint">Prometheus endpoint</InternalLink> and <InternalLink path="logging-overview">logs</InternalLink>.
</Note>

## Memory

CockroachDB is <InternalLink path="demo-cockroachdb-resilience">resilient</InternalLink> to node crashes. However, frequent node restarts caused by <InternalLink path="cluster-setup-troubleshooting#out-of-memory-oom-crash">out-of-memory (OOM) crashes</InternalLink> can impact cluster stability and performance.

### Memory planning

Provision enough memory and allocate an appropriate portion for data caching:

* Provision at least **4 GiB of RAM per vCPU**.

* Disable Linux memory swapping. Over-allocating memory on production machines can lead to unexpected performance issues when pages have to be read back into memory.

* The default value for `--cache` is 128 MiB. For production deployments, set `--cache` to `25%` or higher. To determine appropriate settings for `--cache` and `--max-sql-memory`, use the following formula: <pre>`(2 * --max-sql-memory) + --cache <= 80% of system RAM
  `</pre>

To help guard against <InternalLink path="cluster-setup-troubleshooting#out-of-memory-oom-crash">OOM events</InternalLink>, CockroachDB sets a soft memory limit using mechanisms in Go. Depending on your hardware and workload, you may not need to manually tune `--max-sql-memory`.

Test the configuration with a reasonable workload before deploying it to production.

<Note>
  On startup, if CockroachDB detects that `--max-sql-memory` or `--cache` are set too aggressively, a warning is logged.
</Note>

For additional memory recommendations, refer to <InternalLink path="recommended-production-settings#memory">Recommended Production Settings: Memory</InternalLink> and <InternalLink path="recommended-production-settings#cache-and-sql-memory-size">Recommended Production Setting: Cache and SQL memory size</InternalLink>.

### Memory monitoring

Monitor memory usage and node behavior for <InternalLink path="cluster-setup-troubleshooting#out-of-memory-oom-crash">OOM errors</InternalLink>:

| Metric or event                                 | Description                                |
| ----------------------------------------------- | ------------------------------------------ |
| [Node process restarts](#node-process-restarts) | Nodes restarting after crashes             |
| [SQL memory usage](#sql-memory-usage)           | The memory allocated to the SQL layer      |
| [Database memory usage](#database-memory-usage) | The memory in use by CockroachDB processes |

#### Node process restarts

CockroachDB attempts to restart nodes after they crash. Nodes that frequently restart following an abrupt process exit may point to an underlying memory issue.

* The <InternalLink path="ui-cluster-overview-page#node-status">**Node status**</InternalLink> on the Cluster Overview page indicates whether nodes are online (`LIVE`) or have crashed (`SUSPECT` or `DEAD`).

* When deploying on <InternalLink path="kubernetes-overview">Kubernetes</InternalLink>, the `kubectl get pods` output contains a `RESTARTS` column that tracks the number of restarts for each CockroachDB pod.

* The `OPS` <InternalLink path="logging-overview#logging-channels">logging channel</InternalLink> will record a <InternalLink path="eventlog#node_restart">`node_restart` event</InternalLink> whenever a node rejoins the cluster after being offline.

* A <InternalLink path="monitoring-and-alerting#node-is-restarting-too-frequently">Prometheus alert</InternalLink> can notify when a node has restarted more than once in the last 10 minutes.

##### Verify OOM errors

If you observe nodes frequently restarting, confirm that the crashes are caused by <InternalLink path="cluster-setup-troubleshooting#out-of-memory-oom-crash">OOM errors</InternalLink>:

* Monitor `dmesg` to determine if a node crashed because it ran out of memory:

  ```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  $ sudo dmesg | grep -iC 3 "cockroach"
  ```

  The following output indicates the node crashed due to insufficient memory:

  ```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  $ host kernel: Out of Memory: Killed process <process_id> (cockroach).
  ```

* When deploying on <InternalLink path="kubernetes-overview">Kubernetes</InternalLink>, run `kubectl logs {pod-name}` and look for OOM errors in the log messages.

To prevent OOM crashes, <InternalLink path="recommended-production-settings#memory">provision sufficient memory</InternalLink>. If all CockroachDB machines are provisioned and configured correctly, either run the CockroachDB process on another node with sufficient memory, or <InternalLink path="recommended-production-settings#cache-and-sql-memory-size">reduce the memory allocated to CockroachDB</InternalLink>.

If you confirm that nodes are crashing due to OOM errors, also check whether [SQL queries](#sql-memory-usage) may be responsible.

#### SQL memory usage

An untuned SQL query can consume significant resources and impact the performance of other workloads.

* The <InternalLink path="ui-sql-dashboard#sql-memory">**SQL Memory**</InternalLink> graph on the SQL dashboard shows the current amount of memory in KiB allocated to the SQL layer.

  **Expected values for a healthy cluster**: This value should not exceed the <InternalLink path="recommended-production-settings#cache-and-sql-memory-size">`--max-sql-memory`</InternalLink> size. A healthy threshold is 75% of allocated `--max-sql-memory`.

* The "active query dump", enabled by default with the `diagnostics.active_query_dumps.enabled` <InternalLink path="cluster-settings">cluster setting</InternalLink>, is a record of anonymized active queries that is written to disk when a node is detected to be under memory pressure.

  You can use the active query dump to correlate specific queries to OOM crashes. Active query dumps have the filename `activequeryprof.{date-and-time}.csv` and are found in the `heap_profiler` directory in the configured <InternalLink path="configure-logs#logging-directory">logging directory</InternalLink>. They are also included when running <InternalLink path="cockroach-debug-zip">`cockroach debug zip`</InternalLink>.

* A `SHOW STATEMENTS` statement can <InternalLink path="manage-long-running-queries#identify-long-running-queries">identify long-running queries</InternalLink> on the cluster that may be consuming excessive memory.

* A <InternalLink path="common-errors#memory-budget-exceeded">`memory budget exceeded`</InternalLink> error in the logs indicates that `--max-sql-memory`, the memory allocated to the SQL layer, was exceeded by the operation referenced in the error. For guidance on resolving this issue, see <InternalLink path="common-errors#memory-budget-exceeded">Common Errors</InternalLink>.

If you find queries that are consuming too much memory, <InternalLink path="manage-long-running-queries#cancel-long-running-queries">cancel the queries</InternalLink> to free up memory usage. For information on optimizing query performance, see <InternalLink path="performance-best-practices-overview">SQL Performance Best Practices</InternalLink>.

We **strongly recommend** adding size limits to all <InternalLink path="indexes">indexed columns</InternalLink>, which includes columns in <InternalLink path="primary-key">primary keys</InternalLink>.

Values exceeding 1 MiB can lead to <InternalLink path="architecture/storage-layer#write-amplification">storage layer write amplification</InternalLink> and cause significant performance degradation or even <InternalLink path="cluster-setup-troubleshooting#out-of-memory-oom-crash">crashes due to OOMs (out of memory errors)</InternalLink>.

To add a size limit using <InternalLink path="create-table">`CREATE TABLE`</InternalLink>:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
CREATE TABLE name (first STRING(100), last STRING(100));
```

To add a size limit using <InternalLink path="alter-table#alter-column">`ALTER TABLE ... ALTER COLUMN`</InternalLink>:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
ALTER TABLE name ALTER first TYPE STRING(99);
```

#### Database memory usage

CockroachDB memory usage includes both accounted memory, such as the amount allocated to `--cache` and `--max-sql-memory`; and unaccounted memory, such as uncollected Go garbage and process overhead.

* The <InternalLink path="ui-runtime-dashboard#memory-usage">**Memory Usage**</InternalLink> graph on the Runtime dashboard shows the total memory in use by CockroachDB processes. The RSS (resident set size) metric represents actual CockroachDB memory usage from the OS/Linux/pod point of view. The Go and CGo metrics represent memory allocation and total usage from a CockroachDB point of view.

  **Expected values for a healthy cluster**: Go Allocated will depend on workload but should not exceed <InternalLink path="cockroach-start#flags">`--max-sql-memory`</InternalLink> by more than 100%. CGo Allocated should not exceed the <InternalLink path="cockroach-start#flags">`--cache`</InternalLink> size and CGo Total should not exceed the <InternalLink path="cockroach-start#flags">`--cache`</InternalLink> size by more than 15%.

For more context on acceptable memory usage, see <InternalLink path="cluster-setup-troubleshooting#suspected-memory-leak">Suspected memory leak</InternalLink>.

## Storage and disk I/O

The cluster will underperform if storage is not provisioned or configured correctly. This can lead to further issues such as <InternalLink path="cluster-setup-troubleshooting#disk-stalls">disk stalls</InternalLink> and node shutdown.

### Storage and disk planning

Provision enough storage capacity for CockroachDB data, and configure your volumes to maximize disk I/O:

| Category | Recommendations                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Storage  | - Provision volumes with **320 GiB per vCPU**. - Use dedicated volumes for the CockroachDB <InternalLink path="cockroach-start#store">store</InternalLink>. Do not share the store volume with any other I/O activity. - Determine where CockroachDB <InternalLink path="configure-logs#logging-directory">log files</InternalLink> will be stored: either on the same volume as the main data store or on a separate volume from the main data store. Refer to <InternalLink path="logging-best-practices#storage-considerations-for-file-sinks">Storage considerations for file sinks</InternalLink> in Logging Best Practices. - See additional storage recommendations in the <InternalLink path="recommended-production-settings#storage">Recommended Production Settings</InternalLink>. |
| Disk I/O | - Disks must be able to achieve **500 IOPS and 30 MB/s per vCPU**. - Do not use LVM in the I/O path. Dynamically resizing CockroachDB store volumes can result in significant performance degradation. Using LVM snapshots in lieu of CockroachDB <InternalLink path="take-full-and-incremental-backups">backup and restore</InternalLink> is also not supported. Use <InternalLink path="cockroach-start#store">multiple stores per node</InternalLink> instead. - See additional disk I/O recommendations in the <InternalLink path="recommended-production-settings">Recommended Production Settings</InternalLink>.                                                                                                                                                                        |

### Storage and disk monitoring

Monitor storage capacity and disk performance:

| Metric or event                                   | Description                                                                                                                                      |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Storage capacity](#storage-capacity)             | The available and used disk capacity in the CockroachDB <InternalLink path="cockroach-start#store">store</InternalLink>.                         |
| [Disk IOPS](#disk-iops)                           | The I/O requests per second.                                                                                                                     |
| [Node heartbeat latency](#node-heartbeat-latency) | The time between <InternalLink path="cluster-setup-troubleshooting#node-liveness-issues">node liveness</InternalLink> heartbeats.                |
| [Command commit latency](#command-commit-latency) | The speed at which <InternalLink path="architecture/replication-layer">Raft commands</InternalLink> are being committed by nodes in the cluster. |

<a id="storage" />

#### Storage capacity

CockroachDB requires disk space in order to accept writes. When a node runs out of disk space, it [shuts down](#node-health) and cannot be restarted until space is freed up.

* The <InternalLink path="ui-storage-dashboard#capacity">**Capacity**</InternalLink> graph on the Overview and Storage dashboards shows the available and used disk capacity in the CockroachDB <InternalLink path="cockroach-start#store">store</InternalLink>.

  **Expected values for a healthy cluster**: Used capacity should not persistently exceed 80% of the total capacity.

* A <InternalLink path="monitoring-and-alerting#node-is-running-low-on-disk-space">Prometheus alert</InternalLink> can notify when a node has less than 15% of free space remaining.

<Tip>
  Ensure that you <InternalLink path="recommended-production-settings#storage">provision sufficient storage</InternalLink>. If storage is correctly provisioned and is running low, CockroachDB automatically creates an emergency ballast file that can free up space. For details, see <InternalLink path="cluster-setup-troubleshooting#disks-filling-up">Disks filling up</InternalLink>.
</Tip>

For instructions on how to free up disk space as quickly as possible after dropping a table, see <InternalLink path="operational-faqs#how-can-i-free-up-disk-space-when-dropping-a-table">How can I free up disk space that was used by a dropped table?</InternalLink>

#### Disk IOPS

Insufficient disk I/O can cause [poor SQL performance](#service-latency) and potentially <InternalLink path="cluster-setup-troubleshooting#disk-stalls">disk stalls</InternalLink>.

* The <InternalLink path="ui-hardware-dashboard#disk-ops-in-progress">**Disk Ops In Progress**</InternalLink> graph on the Hardware dashboard shows the number of disk reads and writes in queue.

  **Expected values for a healthy cluster**: This value should be 0 or single-digit values for short periods of time. If the values persist in double digits, you may have an I/O bottleneck.

* The Linux tool `iostat` (part of `sysstat`) can be used to monitor IOPS. In the device status output, `avgqu-sz` corresponds to the **Disk Ops In Progress** metric. If service times persist in double digits on any node, this means that your storage device is saturated and is likely under-provisioned or misconfigured.

With insufficient disk I/O, you may also see:

* Degradation in [SQL response time](#service-latency).
* An [unhealthy LSM](#lsm-health).

#### Node heartbeat latency

* The <InternalLink path="ui-distributed-dashboard#node-heartbeat-latency-99th-percentile">**Node Heartbeat Latency: 99th percentile**</InternalLink> and <InternalLink path="ui-distributed-dashboard#node-heartbeat-latency-90th-percentile">**Node Heartbeat Latency: 90th percentile**</InternalLink> graphs on the <InternalLink path="ui-distributed-dashboard">Distributed Dashboard</InternalLink> show the time elapsed between node heartbeats.

  **Expected values for a healthy cluster**: Less than 100ms in addition to the <InternalLink path="ui-network-latency-page">network latency</InternalLink> between nodes in the cluster.

For the purposes of <InternalLink path="architecture/replication-layer#raft">Raft replication</InternalLink> and determining the <InternalLink path="architecture/overview">leaseholder</InternalLink> of a <InternalLink path="architecture/overview">range</InternalLink>, node health is no longer determined by heartbeating a single "liveness range"; instead it is determined using <InternalLink path="architecture/replication-layer#leader-leases">Leader leases</InternalLink>.

<a id="liveness-range" />

However, node heartbeats of a single range are still used to determine:

* Whether a node is still a member of a cluster (this is used by <InternalLink path="cockroach-node#node-decommission">`cockroach node decommission`</InternalLink>).
* Whether a node is dead (in which case <InternalLink path="architecture/replication-layer#how-leases-are-transferred-from-a-dead-node">its leases will be transferred away</InternalLink>).
* How to avoid placing replicas on dead, decommissioning or unhealthy nodes, and to make decisions about lease transfers.

#### Command commit latency

* The **Command Commit Latency: 50th percentile** and **Command Commit Latency: 99th percentile** graphs on the <InternalLink path="ui-storage-dashboard">Storage dashboard</InternalLink> show how quickly <InternalLink path="architecture/replication-layer">Raft commands</InternalLink> are being committed by nodes in the cluster. This is a good signal of I/O load.

  **Expected values for a healthy cluster**: On SSDs (<InternalLink path="recommended-production-settings#storage">strongly recommended</InternalLink>), this should be between 1 and 100 milliseconds. On HDDs, this should be no more than 1 second.

## See also

* <InternalLink path="recommended-production-settings">Recommended Production Settings</InternalLink>
* <InternalLink path="monitoring-and-alerting">Monitoring and Alerting</InternalLink>
* <InternalLink path="common-errors">Common Errors and Solutions</InternalLink>
* <InternalLink path="operational-faqs">Operational FAQs</InternalLink>
* <InternalLink path="performance-recipes">Performance Tuning Recipes</InternalLink>
* <InternalLink path="cluster-setup-troubleshooting">Troubleshoot Cluster Setup</InternalLink>
* <InternalLink path="query-behavior-troubleshooting">Troubleshoot SQL Behavior</InternalLink>
* <InternalLink path="admission-control">Admission Control</InternalLink>
* <InternalLink path="metrics">Metrics</InternalLink>
* <InternalLink version="cockroachcloud" path="alerts-page">Alerts Page</InternalLink> (CockroachDB Advanced)
