diff --git a/tidb-cloud/built-in-monitoring.md b/tidb-cloud/built-in-monitoring.md index ac96f037d07a5..7fa7088e2fed0 100644 --- a/tidb-cloud/built-in-monitoring.md +++ b/tidb-cloud/built-in-monitoring.md @@ -32,15 +32,15 @@ The following sections illustrate the metrics on the **Metrics** page for TiDB C | Metric name | Labels | Description | | :------------| :------| :-------------------------------------------- | | Database Time by SQL types | database time, {SQL type} | database time: 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`. | -| Query Per Second | {SQL type} | The number of SQL statements executed per second in all TiDB instances, which are collected by SQL types, such as `SELECT`, `INSERT`, and `UPDATE`. | +| Query Per Second | {SQL type} | The number of SQL statements executed per second in all TiDB nodes, which are collected by SQL types, such as `SELECT`, `INSERT`, and `UPDATE`. | | Query Duration | avg-{SQL type}, 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. In general, client requests are sent in the form of SQL statements; however, this duration can include the execution time of commands such as `COM_PING`, `COM_SLEEP`, `COM_STMT_FETCH`, and `COM_SEND_LONG_DATA`. TiDB supports Multi-Query, which means the client can send multiple SQL statements at one time, such as `select 1; select 1; select 1;`. In this case, the total execution time of this query includes the execution time of all SQL statements. | -| Failed Queries | All, {Error type} @ {instance} | The statistics of error types (such as syntax errors and primary key conflicts) according to the SQL statement execution errors per minute on each TiDB instance. It contains the module in which an error occurs and the error code. | -| Command Per Second | Query, StmtExecute, and StmtPrepare | The number of commands processed by all TiDB instances per second based on command types. | -| Queries Using Plan Cache OPS | hit, miss | hit: the number of queries using plan cache per second in all TiDB instances.
miss: the number of queries missing plan cache per second in all TiDB instances. | +| Failed Queries | All, {Error type} @ {instance} | The statistics of error types (such as syntax errors and primary key conflicts) according to the SQL statement execution errors per minute on each TiDB node. It contains the module in which an error occurs and the error code. | +| Command Per Second | Query, StmtExecute, and StmtPrepare | The number of commands processed by all TiDB nodes per second based on command types. | +| Queries Using Plan Cache OPS | hit, miss | hit: the number of queries using plan cache per second in all TiDB nodes.
miss: the number of queries missing plan cache per second in all TiDB nodes. | | Transaction Per Second | {types}-{transaction model} | The number of transactions executed per second. | | Transaction Duration | avg-{transaction model}, 99-{transaction model} | The average or the 99th percentile duration of transactions. | -| Connection Count | All, active connection | All: the number of connections to all TiDB instances.
Active connections: the number of active connections to all TiDB instances. | -| Disconnection Count | {instance}-{result} | The number of clients disconnected to each TiDB instance. | +| Connection Count | All, active connection | All: the number of connections to all TiDB nodes.
Active connections: the number of active connections to all TiDB nodes. | +| Disconnection Count | {instance}-{result} | The number of clients disconnected to each TiDB node. | ### Advanced @@ -51,9 +51,9 @@ The following sections illustrate the metrics on the **Metrics** page for TiDB C | Parse Duration | avg, 99 | The average or the 99th percentile duration consumed in parsing SQL statements. | | Compile Duration | avg, 99 | The average or the 99th percentile duration consumed in compiling the parsed SQL AST to execution plans. | | Execute Duration | avg, 99 | The 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 in all TiDB instances based on request types, such as `Get`, `Prewrite`, and `Commit`. | +| Average TiDB KV Request Duration | {Request Type} | The average time consumed in executing KV requests in all TiDB nodes based on request types, such as `Get`, `Prewrite`, and `Commit`. | | Average TiKV gRPC Duration | {Request Type} | The average time consumed in executing gRPC requests in all TiKV instances based on request types, such as `kv_get`, `kv_prewrite`, and `kv_commit`. | -| Average / P99 PD TSO Wait/RPC Duration | wait-avg/99, rpc-avg/99 | Wait: the average or the 99th percentile duration in waiting for PD to return TSO in all TiDB instances.
RPC: the average time or the 99th percentile of duration from sending TSO requests to PD to receiving TSO in all TiDB instances. | +| Average / P99 PD TSO Wait/RPC Duration | wait-avg/99, rpc-avg/99 | Wait: the average or the 99th percentile duration in waiting for PD to return TSO in all TiDB nodes.
RPC: the average time or the 99th percentile of duration from sending TSO requests to PD to receiving TSO in all TiDB nodes. | | Average / P99 Storage Async Write Duration | avg, 99 | The average or the 99th percentile duration consumed in asynchronous writing. Average storage async write duration = Average store duration + Average apply duration. | | Average / P99 Store Duration | avg, 99 | The average or the 99th percentile duration consumed in storing loop during asynchronous writing. | | Average / P99 Apply Duration | avg, 99 | The average or the 99th percentile duration consumed in applying loop during asynchronous writing. | diff --git a/tidb-cloud/monitor-datadog-integration.md b/tidb-cloud/monitor-datadog-integration.md index 73b005a9c2c6c..9a7741b25c807 100644 --- a/tidb-cloud/monitor-datadog-integration.md +++ b/tidb-cloud/monitor-datadog-integration.md @@ -95,9 +95,9 @@ Datadog tracks the following metrics for your TiDB clusters. | Metric name | Metric type | Labels | Description | | :------------| :---------- | :------| :----------------------------------------------------- | | tidb_cloud.db_database_time| gauge | sql_type: Select\|Insert\|...
cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The total time consumed by all SQL statements running in TiDB per second, including the CPU time of all processes and the non-idle waiting time. | -| tidb_cloud.db_query_per_second| gauge | type: Select\|Insert\|...
cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The number of SQL statements executed per second on all TiDB instances, counted by the statement type (`SELECT`, `INSERT`, or `UPDATE`). | +| tidb_cloud.db_query_per_second| gauge | type: Select\|Insert\|...
cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The number of SQL statements executed per second on all TiDB nodes, counted by the statement type (`SELECT`, `INSERT`, or `UPDATE`). | | tidb_cloud.db_average_query_duration| gauge | sql_type: Select\|Insert\|...
cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The duration between the time that the client's network request is sent to TiDB and the time that the request is returned to the client after TiDB has executed it. | -| tidb_cloud.db_failed_queries| gauge | type: executor:xxxx\|parser:xxxx\|...
cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The statistics of error types (such as syntax errors and primary key conflicts) according to the SQL execution errors that occur per second on each TiDB instance. | +| tidb_cloud.db_failed_queries| gauge | type: executor:xxxx\|parser:xxxx\|...
cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The statistics of error types (such as syntax errors and primary key conflicts) according to the SQL execution errors that occur per second on each TiDB node. | | tidb_cloud.db_total_connection| gauge | cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The number of current connections in your TiDB server. | | tidb_cloud.db_active_connections| gauge | cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The number of active connections. | | tidb_cloud.db_disconnections| gauge | result: ok\|error\|undetermined
cluster_name: ``
instance: tidb-0\|tidb-1…
component: `tidb` | The number of disconnected clients. | diff --git a/tidb-cloud/monitor-new-relic-integration.md b/tidb-cloud/monitor-new-relic-integration.md index 0f0e34bfd52c6..0a0db8ee8cc8d 100644 --- a/tidb-cloud/monitor-new-relic-integration.md +++ b/tidb-cloud/monitor-new-relic-integration.md @@ -135,9 +135,9 @@ New Relic tracks the following metrics for your TiDB clusters. | Metric name | Metric type | Labels | Description | | :------------| :---------- | :------| :----------------------------------------------------- | | tidb_cloud.db_database_time| gauge | sql_type: Select\|Insert\|...

cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The total time consumed by all SQL statements running in TiDB per second, including the CPU time of all processes and the non-idle waiting time. | -| tidb_cloud.db_query_per_second| gauge | type: Select\|Insert\|...

cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The number of SQL statements executed per second on all TiDB instances, which is counted according to `SELECT`, `INSERT`, `UPDATE`, and other types of statements. | +| tidb_cloud.db_query_per_second| gauge | type: Select\|Insert\|...

cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The number of SQL statements executed per second on all TiDB nodes, which is counted according to `SELECT`, `INSERT`, `UPDATE`, and other types of statements. | | tidb_cloud.db_average_query_duration| gauge | sql_type: Select\|Insert\|...

cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The duration between the time that the client's network request is sent to TiDB and the time that the request is returned to the client after TiDB has executed it. | -| tidb_cloud.db_failed_queries| gauge | type: executor:xxxx\|parser:xxxx\|...

cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The statistics of error types (such as syntax errors and primary key conflicts) according to the SQL execution errors that occur per second on each TiDB instance. | +| tidb_cloud.db_failed_queries| gauge | type: executor:xxxx\|parser:xxxx\|...

cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The statistics of error types (such as syntax errors and primary key conflicts) according to the SQL execution errors that occur per second on each TiDB node. | | tidb_cloud.db_total_connection| gauge | cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The number of current connections in your TiDB server. | | tidb_cloud.db_active_connections| gauge | cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The number of active connections. | | tidb_cloud.db_disconnections| gauge | result: ok\|error\|undetermined

cluster_name: ``

instance: tidb-0\|tidb-1…

component: `tidb` | The number of disconnected clients. | diff --git a/tidb-cloud/premium/built-in-monitoring-premium.md b/tidb-cloud/premium/built-in-monitoring-premium.md index 81d04a7fd6990..a1a1316a30735 100644 --- a/tidb-cloud/premium/built-in-monitoring-premium.md +++ b/tidb-cloud/premium/built-in-monitoring-premium.md @@ -15,7 +15,7 @@ To view the metrics on the **Metrics** page, take the following steps: > **Tip:** > - > You can use the combo box in the upper-left corner to switch between organizations and TiDB instances. + > You can use the combo box in the upper-left corner to switch between organizations, projects, and resources. 2. In the left navigation pane, click **Monitoring** > **Metrics**. @@ -33,16 +33,16 @@ The following sections illustrate the metrics on the **Metrics** page for {{{ .p | :------------| :------| :-------------------------------------------- | | Request Units per Second | Total RU per second | The 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 Second | All, {SQL type} | The number of SQL statements executed per second in all TiDB instances, which are collected by SQL types, such as `SELECT`, `INSERT`, and `UPDATE`. | +| Query Per Second | All, {SQL type} | The number of SQL statements executed per second, which are collected by SQL types, such as `SELECT`, `INSERT`, and `UPDATE`. | | Query Duration | avg, 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 Types | All, {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 Queries | All | The 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 by all TiDB instances per second based on command types. | -| Queries Using Plan Cache OPS | hit, miss | hit: the number of queries using plan cache per second in all TiDB instances.
miss: the number of queries missing plan cache per second in all TiDB instances. | +| Command Per Second | {type} | The number of commands processed per second based on command types. | +| Queries Using Plan Cache OPS | hit, miss | hit: 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 Duration | avg-{transaction model}, 99-{transaction model} | The average or the 99th percentile duration of transactions. | -| Connection Count | All, active connection | All: the number of connections to all TiDB instances.
Active connections: the number of active connections to all TiDB instances. | -| Disconnection Count | {result} | The number of clients disconnected to all TiDB instances. | +| Connection Count | All, active connection | All: the number of connections.
Active connections: the number of active connections. | +| Disconnection Count | {result} | The number of clients disconnected. | ### Database @@ -61,8 +61,8 @@ The following sections illustrate the metrics on the **Metrics** page for {{{ .p | Parse Duration | avg, 99 | The average or the 99th percentile duration consumed in parsing SQL statements. | | Compile Duration | avg, 99 | The average or the 99th percentile duration consumed in compiling the parsed SQL AST to execution plans. | | Execute Duration | avg, 99 | The 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 in all TiDB instances based on request types, such as `Get`, `Prewrite`, and `Commit`. | -| Average / P99 PD TSO Wait/RPC Duration | wait-avg/99, rpc-avg/99 | Wait: the average or the 99th percentile duration in waiting for PD to return TSO in all TiDB instances.
RPC: the average time or the 99th percentile of duration from sending TSO requests to PD to receiving TSO in all TiDB instances. | +| 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 Duration | wait-avg/99, rpc-avg/99 | Wait: 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 diff --git a/tidb-cloud/serverless-faqs.md b/tidb-cloud/serverless-faqs.md index 6b6e6a139b33a..ee3c80ebce1e2 100644 --- a/tidb-cloud/serverless-faqs.md +++ b/tidb-cloud/serverless-faqs.md @@ -130,7 +130,7 @@ This is because TiDB retains dropped tables and databases for a certain period o ### Why are there RU consumptions when I'm not actively running any queries? -RU consumptions can occur in various scenarios. One common scenario is during background queries, including but not limited to synchronizing schema changes between TiDB instances, executing DDL jobs, refreshing privileges, refreshing SQL bindings, and refreshing global variables. Another scenario is when certain web console features generate queries, like loading schemas. These processes use RUs even without explicit user triggers. +RU consumptions can occur in various scenarios. One common scenario is during background queries, including but not limited to synchronizing schema changes between TiDB nodes, executing DDL jobs, refreshing privileges, refreshing SQL bindings, and refreshing global variables. Another scenario is when certain web console features generate queries, like loading schemas. These processes use RUs even without explicit user triggers. ### Why is there a spike in RU usage when my workload is steady? diff --git a/tidb-cloud/serverless-high-availability.md b/tidb-cloud/serverless-high-availability.md index 4ad922247cbf9..29aa7d6aaa9a4 100644 --- a/tidb-cloud/serverless-high-availability.md +++ b/tidb-cloud/serverless-high-availability.md @@ -175,7 +175,7 @@ These automated backups enable you to restore your database either from a full b During a failure, ongoing transactions on the failed server might be interrupted. Although failover is transparent to applications, you must implement logic to handle recoverable failures during active transactions. Different failure scenarios are handled as follows: -- **TiDB failures**: If a TiDB instance fails, client connections are unaffected because TiDB Cloud automatically reroutes traffic through the gateway. While transactions on the failed TiDB instance might be interrupted, the system ensures that committed data is preserved, and new transactions are handled by another available TiDB instance. +- **TiDB failures**: If a TiDB node fails, client connections are unaffected because TiDB Cloud automatically reroutes traffic through the gateway. While transactions on the failed TiDB node might be interrupted, the system ensures that committed data is preserved, and new transactions are handled by another available TiDB node. - **Gateway failures**: If the Gateway fails, client connections are disrupted. However, TiDB Cloud gateways are stateless and can restart immediately in a new zone or server. Traffic is automatically redirected to the new gateway, minimizing downtime. It is recommended to implement retry logic in your application to handle recoverable failures. For implementation details, refer to your driver or ORM documentation (for example, [JDBC](https://dev.mysql.com/doc/connector-j/en/connector-j-config-failover.html)).