These graphs are available for CockroachDB Basic deployments. For graphs available to CockroachDB Standard or Advanced deployments, refer to the CockroachDB Cloud Console Metrics page.
The Request Unit metrics let you monitor resource consumption. All cluster activity, including SQL queries, bulk operations, and background jobs, is measured in Request Units, or RUs. An RU is an abstracted metric that represents the compute and I/O resources used by a database operation. In addition to queries that you run, background activity, such as automatic statistics to optimize your queries or connecting a changefeed to an external sink, also consumes RUs.
To view these graphs, select a cluster from the Clusters page, and click Metrics in the Monitoring section of the left side navigation. On the Metrics page, click the Request Units tab.
Time interval selection
The time interval selector at the top of each tab allows you to filter the view for a predefined or custom time interval. Use the navigation buttons to move to the previous, next, or current time interval. When you select a time interval, the same interval is selected for all charts on the Metrics page.
Request Units
Short Name | CockroachDB Metric Name | Description | Usage |
RU, Average RUs | tenant.consumption.request_units |
Total RU consumption | The CPU and I/O resources being used by queries in the cluster. Simple queries consume few RUs, while complicated queries with many reads and writes consume more RUs. To learn more about how RUs are calculated, refer to Resource Usage. |
CPU
Short Name | CockroachDB Metric Name | Description | Usage |
Total amount of CPU used by SQL pods | tenant.consumption.sql_pods_cpu_seconds |
Total amount of CPU used by SQL pods | The number of RUs consumed by CPU usage of SQL processes (not storage processes). The CPU seconds is converted to Request Units using this equivalency:
1 RU = 3 milliseconds SQL CPU. Correlate this metric with Request Units (RUs) and determine if your workload is CPU-intensive. To learn more about how RUs are calculated, refer to Resource Usage. |
Egress
Short Name | CockroachDB Metric Name | Description | Usage |
Client traffic | tenant.consumption.pgwire_egress_bytes |
Total number of bytes transferred from a SQL pod to the client | The number of RUs consumed by byte traffic to the client. Egress bytes are converted to Request Units using this equivalency:
1 RU = 1 KiB Network egress. Correlate this metric with Request Units (RUs). To learn more about how RUs are calculated, refer to Resource Usage. |
Bulk I/O operations | tenant.consumption.external_io_egress_bytes |
Total number of bytes written to external services such as cloud storage providers | The number of RUs consumed by byte traffic for cluster bulk I/O operations (e.g., CDC). Egress bytes are converted to Request Units using this equivalency:
1 RU = 1 KiB Network egress. Correlate this metric with Request Units (RUs). To learn more about how RUs are calculated, refer to Resource Usage. |
Reads
Short Name | CockroachDB Metric Name | Description | Usage |
Requests | tenant.consumption.read_requests |
Total number of KV read requests | The number of RUs consumed by KV storage layer reads, broken down by requests. SQL statements are translated into lower-level KV read requests that are sent in batches. Batches may contain any number of requests. Requests can have a payload containing any number of bytes. Storage layer I/O is converted to Request Units using this equivalency:
1 RU = 8 storage read requests Correlate this metric with Request Units (RUs). To learn more about how RUs are calculated, refer to Resource Usage. |
Batches | tenant.consumption.read_batches |
Total number of KV read batches | The number of RUs consumed by KV storage layer reads, broken down by batches. SQL statements are translated into lower-level KV read requests that are sent in batches. Batches may contain any number of requests. Requests can have a payload containing any number of bytes. Storage layer I/O is converted to Request Units using this equivalency:
1 RU = 2 storage read batches Correlate this metric with Request Units (RUs). To learn more about how RUs are calculated, refer to Resource Usage. |
Bytes | tenant.consumption.read_bytes |
Total number of bytes read from KV | The number of RUs consumed by KV storage layer reads, broken down by bytes. SQL statements are translated into lower-level KV read requests that are sent in batches. Batches may contain any number of requests. Requests can have a payload containing any number of bytes. Storage layer I/O is converted to Request Units using this equivalency:
1 RU = 64 KiB read request payload (prorated) Correlate this metric with Request Units (RUs). To learn more about how RUs are calculated, refer to Resource Usage. |
Writes
Short Name | CockroachDB Metric Name | Description | Usage |
Requests | tenant.consumption.write_requests |
Total number of KV write requests | The number of RUs consumed by KV writes, broken down by requests. SQL statements are translated into lower-level KV write requests that are sent in batches. Batches may contain any number of requests. Requests can have a payload containing any number of bytes. Write operations are replicated to multiple storage processes (3 by default), with each replica counted as a separate write operation. Storage layer I/O is converted to Request Units using this equivalency:
1 RU = 1 storage write request Correlate this metric with Request Units (RUs). To learn more about how RUs are calculated, refer to Resource Usage. |
Batches | tenant.consumption.write_batches |
Total number of KV write batches | The number of RUs consumed by KV writes, broken down by batches. SQL statements are translated into lower-level KV write requests that are sent in batches. Batches may contain any number of requests. Requests can have a payload containing any number of bytes. Write operations are replicated to multiple storage processes (3 by default), with each replica counted as a separate write operation. Storage layer I/O is converted to Request Units using this equivalency:
1 RU = 1 storage write batch Correlate this metric with Request Units (RUs). To learn more about how RUs are calculated, refer to Resource Usage. |
Bytes | tenant.consumption.write_bytes |
Total number of bytes written to KV | The number of RUs consumed by KV writes, broken down by bytes. SQL statements are translated into lower-level KV write requests that are sent in batches. Batches may contain any number of requests. Requests can have a payload containing any number of bytes. Write operations are replicated to multiple storage processes (3 by default), with each replica counted as a separate write operation. Storage layer I/O is converted to Request Units using this equivalency:
1 RU = 1 KiB write request payload (prorated) Correlate this metric with Request Units (RUs). To learn more about how RUs are calculated, refer to Resource Usage. |
Cross-region Networking
Short Name | CockroachDB Metric Name | Description | Usage |
Network traffic | tenant.consumption.cross_region_network_ru |
Total number of RUs charged for cross-region network traffic | The number of RUs consumed by cross-region networking. Correlate these metrics with Request Units (RUs). For more information about multi-region clusters and networking, refer to Multi-region clusters. |