📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

TiDB Cloud Premium Built-in Metrics



TiDB Cloud collects and displays a full set of standard metrics of your TiDB Cloud Premium instance on the Metrics page. By viewing these metrics, you can easily identify performance issues and determine whether your current database deployment meets your requirements.

View the Metrics page

To view the metrics on the Metrics page, take the following steps:

  1. On the My TiDB page, click the name of your target TiDB Cloud Premium instance to go to its overview page.

  2. In the left navigation pane, click Monitoring > Metrics.

Metrics retention policy

For TiDB Cloud Premium instances, the metrics data is kept for 7 days.

Metrics for TiDB Cloud Premium Instances

The following sections illustrate the metrics on the Metrics page for TiDB Cloud Premium instances.

Overview

Metric nameLabelsDescription
Request Units per SecondTotal RU per secondThe Request Unit (RU) is a unit of measurement used to track the resource consumption of a query or transaction. In addition to queries that you run, request units can be consumed by background activities, so when the QPS is 0, the request units per second might not be zero.
Used Storage Size{type}The size of the row store and the size of the column store.
Query Per SecondAll, {SQL type}The number of SQL statements executed per second, which are collected by SQL types, such as SELECT, INSERT, and UPDATE.
Query Durationavg, avg-{SQL type}, 99, 99-{SQL type}The duration from receiving a request from the client to TiDB until TiDB executes the request and returns the result to the client.
Database Time by SQL TypesAll, {SQL type}All: total database time per second.
{SQL type}: database time consumed by SQL statements per second, which are collected by SQL types, such as SELECT, INSERT, and UPDATE.
Failed QueriesAllThe statistics of error types (such as syntax errors and primary key conflicts) according to the SQL statement execution errors per minute.
Command Per Second{type}The number of commands processed per second based on command types.
Queries Using Plan Cache OPShit, misshit: the number of queries using plan cache per second.
miss: the number of queries missing plan cache per second.
Transaction Per Second{types}-{transaction model}The number of transactions executed per second.
Transaction Durationavg-{transaction model}, 99-{transaction model}The average or the 99th percentile duration of transactions.
Connection CountAll, active connectionAll: the number of connections.
Active connections: the number of active connections.
Disconnection Count{result}The number of clients disconnected.

Database

Metric nameLabelsDescription
QPS Per DBAll, {database}The number of SQL statements executed per second on every database, which are collected by SQL types, such as SELECT, INSERT, and UPDATE.
Query Duration Per DBavg, avg-{database}, 99, 99-{database}The duration from receiving a request from the client to a database until the database executes the request and returns the result to the client.
Failed Query Per DBAll, {database}The statistics of error types according to the SQL statement execution errors per second on every database.

Advanced

Metric nameLabelsDescription
Average Idle Connection Durationavg-in-txn, avg-not-in-txnThe connection idle duration indicates the duration of a connection being idle.
avg-in-txn: The average connection idle duration when a connection is within a transaction.
avg-not-in-txn: The average connection idle duration when a connection is not within a transaction.
Get Token Durationavg, 99The average or the 99th percentile duration consumed in getting tokens of SQL statements.
Parse Durationavg, 99The average or the 99th percentile duration consumed in parsing SQL statements.
Compile Durationavg, 99The average or the 99th percentile duration consumed in compiling the parsed SQL AST to execution plans.
Execute Durationavg, 99The average or the 99th percentile duration consumed in executing execution plans of SQL statements.
Average TiDB KV Request Duration{Request Type}The average time consumed in executing KV requests based on request types, such as Get, Prewrite, and Commit.
Average / P99 PD TSO Wait/RPC Durationwait-avg/99, rpc-avg/99Wait: the average or the 99th percentile duration in waiting for PD to return TSO.
RPC: the average time or the 99th percentile of duration from sending TSO requests to PD to receiving TSO.

FAQ

1. Why are some panes empty on this page?

If a pane does not provide any metrics, the possible reasons are as follows:

  • The workload of the corresponding TiDB Cloud Premium instance does not trigger this metric. For example, the failed query metric is always empty in the case of no failed queries.
  • The TiDB version of the TiDB Cloud Premium instance is low. You need to upgrade it to the latest version of TiDB to see these metrics.

If all these reasons are excluded, you can contact the PingCAP support team for troubleshooting.

2. Why might metrics be discontinuous in rare cases?

In some rare cases, metrics might be lost, such as when the metrics system experiences high pressure.

If you encounter this problem, you can contact PingCAP Support for troubleshooting.

Was this page helpful?