From 9faa1b5fd5613e25ebb811d3f99caf6ce1755238 Mon Sep 17 00:00:00 2001 From: Ran Date: Fri, 3 Apr 2020 17:29:49 +0800 Subject: [PATCH 1/5] Create monitor.md --- reference/tiflash/monitor.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 reference/tiflash/monitor.md diff --git a/reference/tiflash/monitor.md b/reference/tiflash/monitor.md new file mode 100644 index 0000000000000..d7bf41484901f --- /dev/null +++ b/reference/tiflash/monitor.md @@ -0,0 +1,11 @@ +--- +title: Monitor the TiFlash Cluster +summary: +category: reference +--- + +# Monitor the TiFlash Cluster + +This document describes the monitoring items of TiFlash and their description. + +## From 9cb90cfd7fcc30b6f6d5782a4334659427c28ea7 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 7 Apr 2020 12:31:59 +0800 Subject: [PATCH 2/5] tiflash: add monitor doc --- reference/tiflash/monitor.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/reference/tiflash/monitor.md b/reference/tiflash/monitor.md index d7bf41484901f..2791146901c2c 100644 --- a/reference/tiflash/monitor.md +++ b/reference/tiflash/monitor.md @@ -1,6 +1,6 @@ --- title: Monitor the TiFlash Cluster -summary: +summary: Learn the monitoring items of TiFlash. category: reference --- @@ -8,4 +8,30 @@ category: reference This document describes the monitoring items of TiFlash and their description. -## +## Monitor the Coprocessor + +| Monitoring items | Description | +|:---|:-----| +| tiflash_coprocessor_request_count | The number of coprocessor requests received. `batch` is the number of batch requests. `batch_cop` is the number of coprocessor requests in the batch requests. `cop` is the number of coprocessor requests that are sent directly via the coprocessor interface. `cop_dag` is the number of dag requests in all coprocessor requests. | +| tiflash_coprocessor_executor_count | The number of each type of dag executors. `table_scan` is the table scan executor. `selection` is the selection executor. `aggregation` is the aggregation executor. `top_n` is the TopN executor. `limit` is the limit executor. | +| tiflash_coprocessor_request_duration_seconds | The histogram of the duration of each coprocessor request, in which the duration is from receiving the coprocessor request to completing response to the request. `batch` is the duration of batch requests. `cop` is the duration of coprocessor requests that are sent directly via the coprocessor interface. | +| tiflash_coprocessor_request_error | The number of errors of coprocessor requests. `meet_lock` means that the data read is locked. `region_not_found` means that the Region does not exist. `epoch_not_match` means the Region epoch read is inconsistent with the local epoch. `kv_client_error` means that the communication with TiKV returns an error. `internal_error` is the internal system error of TiFlash. `other` is other type of errors. | +| tiflash_coprocessor_request_handle_seconds | The histogram of the processing time of each coprocessor request, in which the processing time is from starting to execute the coprocessor request to completing the execution. `batch` is the processing time of batch request. `cop` is the processing time of coprocessor requests that are sent directly via the coprocessor interface. | +| tiflash_coprocessor_response_bytes | The total bytes of the response. | + +## Monitor DDL statements + +| Monitoring items | Description | +|:---|:-----| +| tiflash_schema_version | The version of the schema currently cached in TiFlash. | +| tiflash_schema_apply_count | Divided into `diff apply`, `full apply`, and `failed apply`. `diff apply` is the normal process of a single apply. If `diff apply` fails, `failed apply` increases by `1`, and TiFlash rolls back to `full apply`. | +| tiflash_schema_internal_ddl_count | The number of specific DDL operations in TiFlash. | +| tiflash_schema_apply_duration_seconds | The time used for a single `apply schema` operation. | + +## Monitor Raft + +| Monitoring items | Description | +|:---|:-----| +| tiflash_raft_read_index_count | The number of times that the coprocessor triggers the `read_index` request, which equals to the number of Regions triggered by a coprocessor. | +| tiflash_raft_read_index_duration_seconds | The time used by `read_index`. Most time is used for interaction with Leader and retry. | +| tiflash_raft_wait_index_duration_seconds | The time used by `wait_index`, namely the time used to wait until local index >= read_index after the `read_index` request is received. | From 79be967e9675d5cc7ccfdb09a411af4e95e82bb0 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 7 Apr 2020 12:33:58 +0800 Subject: [PATCH 3/5] TOC: add monitor.md --- TOC.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TOC.md b/TOC.md index 14682038d2c02..18a6068dd2bf2 100644 --- a/TOC.md +++ b/TOC.md @@ -305,6 +305,7 @@ - [Overview](/reference/tiflash/overview.md) - [Deploy a TiFlash Cluster](/reference/tiflash/deploy.md) - [Use TiFlash](/reference/tiflash/use-tiflash.md) + - [Monitor](/reference/tiflash/monitor.md) + TiDB Binlog - [Overview](/reference/tidb-binlog/overview.md) - [Deploy](/reference/tidb-binlog/deploy.md) From e4a7c74f28b5ac819ce9ba77b0e93f0aca3bf0e1 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 7 Apr 2020 21:09:11 +0800 Subject: [PATCH 4/5] Apply suggestions from code review Co-Authored-By: TomShawn <41534398+TomShawn@users.noreply.github.com> --- TOC.md | 2 +- reference/tiflash/monitor.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TOC.md b/TOC.md index 18a6068dd2bf2..5457d06afe482 100644 --- a/TOC.md +++ b/TOC.md @@ -305,7 +305,7 @@ - [Overview](/reference/tiflash/overview.md) - [Deploy a TiFlash Cluster](/reference/tiflash/deploy.md) - [Use TiFlash](/reference/tiflash/use-tiflash.md) - - [Monitor](/reference/tiflash/monitor.md) + - [Monitor TiFlash](/reference/tiflash/monitor.md) + TiDB Binlog - [Overview](/reference/tidb-binlog/overview.md) - [Deploy](/reference/tidb-binlog/deploy.md) diff --git a/reference/tiflash/monitor.md b/reference/tiflash/monitor.md index 2791146901c2c..0e3ef77b10429 100644 --- a/reference/tiflash/monitor.md +++ b/reference/tiflash/monitor.md @@ -6,25 +6,25 @@ category: reference # Monitor the TiFlash Cluster -This document describes the monitoring items of TiFlash and their description. +This document describes the monitoring items of TiFlash. ## Monitor the Coprocessor | Monitoring items | Description | |:---|:-----| -| tiflash_coprocessor_request_count | The number of coprocessor requests received. `batch` is the number of batch requests. `batch_cop` is the number of coprocessor requests in the batch requests. `cop` is the number of coprocessor requests that are sent directly via the coprocessor interface. `cop_dag` is the number of dag requests in all coprocessor requests. | -| tiflash_coprocessor_executor_count | The number of each type of dag executors. `table_scan` is the table scan executor. `selection` is the selection executor. `aggregation` is the aggregation executor. `top_n` is the TopN executor. `limit` is the limit executor. | -| tiflash_coprocessor_request_duration_seconds | The histogram of the duration of each coprocessor request, in which the duration is from receiving the coprocessor request to completing response to the request. `batch` is the duration of batch requests. `cop` is the duration of coprocessor requests that are sent directly via the coprocessor interface. | -| tiflash_coprocessor_request_error | The number of errors of coprocessor requests. `meet_lock` means that the data read is locked. `region_not_found` means that the Region does not exist. `epoch_not_match` means the Region epoch read is inconsistent with the local epoch. `kv_client_error` means that the communication with TiKV returns an error. `internal_error` is the internal system error of TiFlash. `other` is other type of errors. | +| `tiflash_coprocessor_request_count` | The number of coprocessor requests received. `batch` is the number of batch requests. `batch_cop` is the number of coprocessor requests in the batch requests. `cop` is the number of coprocessor requests that are sent directly via the coprocessor interface. `cop_dag` is the number of dag requests in all coprocessor requests. | +| tiflash_coprocessor_executor_count | The number of each type of dag executors. `table_scan` is the table scan executor. `selection` is the selection executor. `aggregation` is the aggregation executor. `top_n` is the `TopN` executor. `limit` is the limit executor. | +| `tiflash_coprocessor_request_duration_seconds` | The histogram of the duration of each coprocessor request, in which the duration is from the time that the coprocessor request is received to the time that the response to the request is completed. `batch` is the duration of batch requests. `cop` is the duration of coprocessor requests that are sent directly via the coprocessor interface. | +| `tiflash_coprocessor_request_error` | The number of errors of coprocessor requests. `meet_lock` means that the read data is locked. `region_not_found` means that the Region does not exist. `epoch_not_match` means the read Region epoch is inconsistent with the local epoch. `kv_client_error` means that the communication with TiKV returns an error. `internal_error` is the internal system error of TiFlash. `other` is other type of errors. | | tiflash_coprocessor_request_handle_seconds | The histogram of the processing time of each coprocessor request, in which the processing time is from starting to execute the coprocessor request to completing the execution. `batch` is the processing time of batch request. `cop` is the processing time of coprocessor requests that are sent directly via the coprocessor interface. | | tiflash_coprocessor_response_bytes | The total bytes of the response. | -## Monitor DDL statements +## Monitor DDL operations | Monitoring items | Description | |:---|:-----| | tiflash_schema_version | The version of the schema currently cached in TiFlash. | -| tiflash_schema_apply_count | Divided into `diff apply`, `full apply`, and `failed apply`. `diff apply` is the normal process of a single apply. If `diff apply` fails, `failed apply` increases by `1`, and TiFlash rolls back to `full apply`. | +| `tiflash_schema_apply_count` | This item includes the count of three types of `appy`: `diff apply`, `full apply`, and `failed apply`. `diff apply` is the normal process of a single apply. If `diff apply` fails, `failed apply` increases by `1`, and TiFlash rolls back to `full apply`. | | tiflash_schema_internal_ddl_count | The number of specific DDL operations in TiFlash. | | tiflash_schema_apply_duration_seconds | The time used for a single `apply schema` operation. | From edda686ce9f9aaa35a6677b254fba9cedf3140a8 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 7 Apr 2020 21:18:59 +0800 Subject: [PATCH 5/5] add backquotes --- reference/tiflash/monitor.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/reference/tiflash/monitor.md b/reference/tiflash/monitor.md index 0e3ef77b10429..aa3ad917a4695 100644 --- a/reference/tiflash/monitor.md +++ b/reference/tiflash/monitor.md @@ -13,25 +13,25 @@ This document describes the monitoring items of TiFlash. | Monitoring items | Description | |:---|:-----| | `tiflash_coprocessor_request_count` | The number of coprocessor requests received. `batch` is the number of batch requests. `batch_cop` is the number of coprocessor requests in the batch requests. `cop` is the number of coprocessor requests that are sent directly via the coprocessor interface. `cop_dag` is the number of dag requests in all coprocessor requests. | -| tiflash_coprocessor_executor_count | The number of each type of dag executors. `table_scan` is the table scan executor. `selection` is the selection executor. `aggregation` is the aggregation executor. `top_n` is the `TopN` executor. `limit` is the limit executor. | +| `tiflash_coprocessor_executor_count` | The number of each type of dag executors. `table_scan` is the table scan executor. `selection` is the selection executor. `aggregation` is the aggregation executor. `top_n` is the `TopN` executor. `limit` is the limit executor. | | `tiflash_coprocessor_request_duration_seconds` | The histogram of the duration of each coprocessor request, in which the duration is from the time that the coprocessor request is received to the time that the response to the request is completed. `batch` is the duration of batch requests. `cop` is the duration of coprocessor requests that are sent directly via the coprocessor interface. | | `tiflash_coprocessor_request_error` | The number of errors of coprocessor requests. `meet_lock` means that the read data is locked. `region_not_found` means that the Region does not exist. `epoch_not_match` means the read Region epoch is inconsistent with the local epoch. `kv_client_error` means that the communication with TiKV returns an error. `internal_error` is the internal system error of TiFlash. `other` is other type of errors. | -| tiflash_coprocessor_request_handle_seconds | The histogram of the processing time of each coprocessor request, in which the processing time is from starting to execute the coprocessor request to completing the execution. `batch` is the processing time of batch request. `cop` is the processing time of coprocessor requests that are sent directly via the coprocessor interface. | -| tiflash_coprocessor_response_bytes | The total bytes of the response. | +| `tiflash_coprocessor_request_handle_seconds` | The histogram of the processing time of each coprocessor request, in which the processing time is from starting to execute the coprocessor request to completing the execution. `batch` is the processing time of batch request. `cop` is the processing time of coprocessor requests that are sent directly via the coprocessor interface. | +| `tiflash_coprocessor_response_bytes` | The total bytes of the response. | ## Monitor DDL operations | Monitoring items | Description | |:---|:-----| -| tiflash_schema_version | The version of the schema currently cached in TiFlash. | +| `tiflash_schema_version` | The version of the schema currently cached in TiFlash. | | `tiflash_schema_apply_count` | This item includes the count of three types of `appy`: `diff apply`, `full apply`, and `failed apply`. `diff apply` is the normal process of a single apply. If `diff apply` fails, `failed apply` increases by `1`, and TiFlash rolls back to `full apply`. | -| tiflash_schema_internal_ddl_count | The number of specific DDL operations in TiFlash. | -| tiflash_schema_apply_duration_seconds | The time used for a single `apply schema` operation. | +| `tiflash_schema_internal_ddl_count` | The number of specific DDL operations in TiFlash. | +| `tiflash_schema_apply_duration_seconds` | The time used for a single `apply schema` operation. | ## Monitor Raft | Monitoring items | Description | |:---|:-----| -| tiflash_raft_read_index_count | The number of times that the coprocessor triggers the `read_index` request, which equals to the number of Regions triggered by a coprocessor. | -| tiflash_raft_read_index_duration_seconds | The time used by `read_index`. Most time is used for interaction with Leader and retry. | -| tiflash_raft_wait_index_duration_seconds | The time used by `wait_index`, namely the time used to wait until local index >= read_index after the `read_index` request is received. | +| `tiflash_raft_read_index_count` | The number of times that the coprocessor triggers the `read_index` request, which equals to the number of Regions triggered by a coprocessor. | +| `tiflash_raft_read_index_duration_seconds` | The time used by `read_index`. Most time is used for interaction with Leader and retry. | +| `tiflash_raft_wait_index_duration_seconds` | The time used by `wait_index`, namely the time used to wait until local index >= read_index after the `read_index` request is received. |