From 651318f69988d346145d490007ab74ae15e62490 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 10:39:14 +0800 Subject: [PATCH 01/12] Add temp.md --- temp.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 temp.md diff --git a/temp.md b/temp.md new file mode 100644 index 0000000000000..af27ff4986a7b --- /dev/null +++ b/temp.md @@ -0,0 +1 @@ +This is a test file. \ No newline at end of file From 263997cc4b72b2f410088cf3e3ba6320e178a241 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 10:39:19 +0800 Subject: [PATCH 02/12] Delete temp.md --- temp.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 temp.md diff --git a/temp.md b/temp.md deleted file mode 100644 index af27ff4986a7b..0000000000000 --- a/temp.md +++ /dev/null @@ -1 +0,0 @@ -This is a test file. \ No newline at end of file From ee0a549e8a9017b1e04904d0796199dbc5bb444f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Jan 2026 02:40:23 +0000 Subject: [PATCH 03/12] Auto-sync: Update English docs from Chinese PR Synced from: https://github.com/pingcap/docs-cn/pull/21213 Target PR: https://github.com/pingcap/docs/pull/22273 AI Provider: gemini Co-authored-by: github-actions[bot] --- tikv-configuration-file.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 32e28474fa096..8ff01ca9b0b10 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -150,7 +150,10 @@ This document only describes the parameters that are not included in command-lin ### `grpc-concurrency` + The number of gRPC worker threads. When you modify the size of the gRPC thread pool, refer to [Performance tuning for TiKV thread pools](/tune-tikv-thread-performance.md#performance-tuning-for-tikv-thread-pools). -+ Default value: `5` ++ Default value: From v8.5.4 and v9.0.0, adjusted to `grpc-raft-conn-num * 3 + 2`. The default value of `grpc-raft-conn-num` can be referenced from [`grpc-raft-conn-num`](#grpc-raft-conn-num). In v8.5.3 and earlier versions, the default value is 5. ++ ++ + For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1, and accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. ++ + Minimum value: `1` ### `grpc-concurrent-stream` @@ -168,7 +171,7 @@ This document only describes the parameters that are not included in command-lin ### `grpc-raft-conn-num` + The maximum number of connections between TiKV nodes for Raft communication -+ Default value: `1` ++ Default value: From v8.5.4 and v9.0.0, adjusted to `MAX(1, MIN(4, CPU cores / 8))`. Here, `MIN(4, CPU cores / 8)` indicates that when the number of CPU cores is greater than or equal to 32, the default maximum number of connections is 4. In v8.5.3 and earlier versions, the default value is 1. + Minimum value: `1` ### `max-grpc-send-msg-len` From aa2794042162ba39ee7a8258dc086c9cbc00c596 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 10:51:21 +0800 Subject: [PATCH 04/12] Update tune-tikv-thread-performance.md --- tune-tikv-thread-performance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tune-tikv-thread-performance.md b/tune-tikv-thread-performance.md index eaee3aadc52ce..8893d077306b3 100644 --- a/tune-tikv-thread-performance.md +++ b/tune-tikv-thread-performance.md @@ -42,7 +42,7 @@ Starting from TiKV v5.0, all read requests use the unified thread pool for queri * The gRPC thread pool. - The default size (configured by `server.grpc-concurrency`) of the gRPC thread pool is `5`. This thread pool has almost no computing overhead and is mainly responsible for network I/O and deserialization requests, so generally you do not need to adjust the default configuration. + Starting from v8.5.4 and v9.0.0, the default size of the gRPC thread pool (configured by `server.grpc-concurrency`) is changed from a fixed value of `5` to an adaptive value calculated based on the number of CPU cores. For the detailed calculation formula, see [`server.grpc-concurrency`](/tikv-configuration-file.md#grpc-concurrency). This thread pool has almost no computing overhead and is mainly responsible for network I/O and deserialization requests, so generally you do not need to adjust the default configuration. - If the machine deployed with TiKV has a small number (less than or equal to 8) of CPU cores, consider setting the `server.grpc-concurrency` configuration item to `2`. - If the machine deployed with TiKV has very high configuration, TiKV undertakes a large number of read and write requests, and the value of `gRPC poll CPU` that monitors Thread CPU on Grafana exceeds 80% of `server.grpc-concurrency`, then consider increasing the value of `server.grpc-concurrency` to keep the thread pool usage rate below 80% (that is, the metric on Grafana is lower than `80% * server.grpc-concurrency`). From fd9d067bcc6c703dae84f8c7c237a5703b62daf3 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:06:08 +0800 Subject: [PATCH 05/12] Apply suggestions from code review --- tikv-configuration-file.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 8ff01ca9b0b10..5c2829d68c057 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -150,9 +150,9 @@ This document only describes the parameters that are not included in command-lin ### `grpc-concurrency` + The number of gRPC worker threads. When you modify the size of the gRPC thread pool, refer to [Performance tuning for TiKV thread pools](/tune-tikv-thread-performance.md#performance-tuning-for-tikv-thread-pools). -+ Default value: From v8.5.4 and v9.0.0, adjusted to `grpc-raft-conn-num * 3 + 2`. The default value of `grpc-raft-conn-num` can be referenced from [`grpc-raft-conn-num`](#grpc-raft-conn-num). In v8.5.3 and earlier versions, the default value is 5. -+ -+ + For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1, and accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. ++ Default value: `grpc-raft-conn-num * 3 + 2` (starting from v8.5.4 and v9.0.0), which is calculated based on the value of [`grpc-raft-conn-num`](#grpc-raft-conn-num). In v8.5.3 and earlier versions, the default value is `5`. + + + For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1. Accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. + + Minimum value: `1` @@ -171,7 +171,7 @@ This document only describes the parameters that are not included in command-lin ### `grpc-raft-conn-num` + The maximum number of connections between TiKV nodes for Raft communication -+ Default value: From v8.5.4 and v9.0.0, adjusted to `MAX(1, MIN(4, CPU cores / 8))`. Here, `MIN(4, CPU cores / 8)` indicates that when the number of CPU cores is greater than or equal to 32, the default maximum number of connections is 4. In v8.5.3 and earlier versions, the default value is 1. ++ Default value: `MAX(1, MIN(4, CPU cores / 8))` (starting from v8.5.4 and v9.0.0), where `MIN(4, CPU cores / 8)` indicates that when the number of CPU cores is greater than or equal to 32, the default maximum number of connections is 4. In v8.5.3 and earlier versions, the default value is 1. + Minimum value: `1` ### `max-grpc-send-msg-len` From a4591f8ff083f5a7ecb80573f63a5f929b6e2144 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:12:02 +0800 Subject: [PATCH 06/12] Update tikv-configuration-file.md --- tikv-configuration-file.md | 1 - 1 file changed, 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 5c2829d68c057..25a9f1d3c202a 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -153,7 +153,6 @@ This document only describes the parameters that are not included in command-lin + Default value: `grpc-raft-conn-num * 3 + 2` (starting from v8.5.4 and v9.0.0), which is calculated based on the value of [`grpc-raft-conn-num`](#grpc-raft-conn-num). In v8.5.3 and earlier versions, the default value is `5`. + For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1. Accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. -+ + Minimum value: `1` ### `grpc-concurrent-stream` From b20e662a5a3e27a5b6a0d68e976bb8a2b6d02e58 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:12:18 +0800 Subject: [PATCH 07/12] Update tikv-configuration-file.md --- tikv-configuration-file.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 25a9f1d3c202a..f181254867d5b 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -153,6 +153,7 @@ This document only describes the parameters that are not included in command-lin + Default value: `grpc-raft-conn-num * 3 + 2` (starting from v8.5.4 and v9.0.0), which is calculated based on the value of [`grpc-raft-conn-num`](#grpc-raft-conn-num). In v8.5.3 and earlier versions, the default value is `5`. + For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1. Accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. + + Minimum value: `1` ### `grpc-concurrent-stream` From d320f82a28c1bc024b190d058ec8f189508dc71f Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:16:49 +0800 Subject: [PATCH 08/12] Apply suggestions from code review --- tikv-configuration-file.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index f181254867d5b..e64bd3a58002c 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -150,9 +150,10 @@ This document only describes the parameters that are not included in command-lin ### `grpc-concurrency` + The number of gRPC worker threads. When you modify the size of the gRPC thread pool, refer to [Performance tuning for TiKV thread pools](/tune-tikv-thread-performance.md#performance-tuning-for-tikv-thread-pools). -+ Default value: `grpc-raft-conn-num * 3 + 2` (starting from v8.5.4 and v9.0.0), which is calculated based on the value of [`grpc-raft-conn-num`](#grpc-raft-conn-num). In v8.5.3 and earlier versions, the default value is `5`. ++ Default value: - + For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1. Accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. + + Starting from v8.5.4 and v9.0.0, the default value is adjusted to `grpc-raft-conn-num * 3 + 2`, which is calculated based on the value of [`grpc-raft-conn-num`](#grpc-raft-conn-num). For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1. Accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. + + In v8.5.3 and earlier versions, the default value is `5`. + Minimum value: `1` @@ -171,7 +172,11 @@ This document only describes the parameters that are not included in command-lin ### `grpc-raft-conn-num` + The maximum number of connections between TiKV nodes for Raft communication -+ Default value: `MAX(1, MIN(4, CPU cores / 8))` (starting from v8.5.4 and v9.0.0), where `MIN(4, CPU cores / 8)` indicates that when the number of CPU cores is greater than or equal to 32, the default maximum number of connections is 4. In v8.5.3 and earlier versions, the default value is 1. ++ Default value: + + + Starting from v8.5.4 and v9.0.0, the default value is adjusted to `MAX(1, MIN(4, CPU cores / 8))`, where `MIN(4, CPU cores / 8)` indicates that when the number of CPU cores is greater than or equal to 32, the default maximum number of connections is 4. + + In v8.5.3 and earlier versions, the default value is 1. + + Minimum value: `1` ### `max-grpc-send-msg-len` From c92488f9148709187b1870e7782bf693524cd0af Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:21:33 +0800 Subject: [PATCH 09/12] Update tikv-configuration-file.md --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index e64bd3a58002c..790a770029155 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -175,7 +175,7 @@ This document only describes the parameters that are not included in command-lin + Default value: + Starting from v8.5.4 and v9.0.0, the default value is adjusted to `MAX(1, MIN(4, CPU cores / 8))`, where `MIN(4, CPU cores / 8)` indicates that when the number of CPU cores is greater than or equal to 32, the default maximum number of connections is 4. - + In v8.5.3 and earlier versions, the default value is 1. + + In v8.5.3 and earlier versions, the default value is `1`. + Minimum value: `1` From 7485c7e1225a5da5b3f8072840c2c5db10f91758 Mon Sep 17 00:00:00 2001 From: qiancai Date: Wed, 7 Jan 2026 11:56:10 +0800 Subject: [PATCH 10/12] modify related docs --- best-practices/massive-regions-best-practices.md | 2 +- best-practices/three-nodes-hybrid-deployment.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/best-practices/massive-regions-best-practices.md b/best-practices/massive-regions-best-practices.md index c38dd0be98c68..9b49df0b7e491 100644 --- a/best-practices/massive-regions-best-practices.md +++ b/best-practices/massive-regions-best-practices.md @@ -149,7 +149,7 @@ The default size of a Region is 256 MiB, and you can reduce the number of Region ### Method 7: Increase the maximum number of connections for Raft communication -By default, the maximum number of connections used for Raft communication between TiKV nodes is 1. Increasing this number can help alleviate blockage issues caused by heavy communication workloads of a large number of Regions. For detailed instructions, see [`grpc-raft-conn-num`](/tikv-configuration-file.md#grpc-raft-conn-num). +To adjust the maximum number of connections used for Raft communication between TiKV nodes, you can modify the [`server.grpc-raft-conn-num`](/tikv-configuration-file.md#grpc-raft-conn-num) configuration item. Increasing this number can help alleviate blockage issues caused by heavy communication workloads of a large number of Regions. > **Note:** > diff --git a/best-practices/three-nodes-hybrid-deployment.md b/best-practices/three-nodes-hybrid-deployment.md index cbd698c50de28..52794404ba6d0 100644 --- a/best-practices/three-nodes-hybrid-deployment.md +++ b/best-practices/three-nodes-hybrid-deployment.md @@ -61,7 +61,7 @@ The default value of this parameter is 80% of the number of machine threads. In #### `server.grpc-concurrency` -This parameter defaults to `4`. Because in the existing deployment plan, the CPU resources are limited and the actual requests are few. You can observe the monitoring panel, lower the value of this parameter, and keep the usage rate below 80%. +Because in the existing deployment plan, the CPU resources are limited and the actual requests are few. You can observe the monitoring panel, lower the value of [`server.grpc-concurrency`](/tikv-configuration-file.md#grpc-concurrency), and keep the usage rate below 80%. In this test, the value of this parameter is set to `2`. Observe the **gRPC poll CPU** panel and you can see that the usage rate is just around 80%. From b8e3c7adf3c5933a3c452a7c15e8ce8253b68117 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 14:16:22 +0800 Subject: [PATCH 11/12] Update tune-tikv-memory-performance.md --- tune-tikv-memory-performance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tune-tikv-memory-performance.md b/tune-tikv-memory-performance.md index f7c688acf797b..4a2cd3587a383 100644 --- a/tune-tikv-memory-performance.md +++ b/tune-tikv-memory-performance.md @@ -40,7 +40,7 @@ log-level = "info" # Size of thread pool for gRPC # grpc-concurrency = 4 # The number of gRPC connections between each TiKV instance -# grpc-raft-conn-num = 10 +# grpc-raft-conn-num = 1 # Most read requests from TiDB are sent to the coprocessor of TiKV. This parameter is used to set the number of threads # of the coprocessor. If many read requests exist, add the number of threads and keep the number within that of the From 48b9dfed2faa669044f01cc27e9959247cadfcb3 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 12 Jan 2026 15:01:32 +0800 Subject: [PATCH 12/12] remove the info about v9.0.0 --- tikv-configuration-file.md | 4 ++-- tune-tikv-thread-performance.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 790a770029155..a2ea81b9af2f6 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -152,7 +152,7 @@ This document only describes the parameters that are not included in command-lin + The number of gRPC worker threads. When you modify the size of the gRPC thread pool, refer to [Performance tuning for TiKV thread pools](/tune-tikv-thread-performance.md#performance-tuning-for-tikv-thread-pools). + Default value: - + Starting from v8.5.4 and v9.0.0, the default value is adjusted to `grpc-raft-conn-num * 3 + 2`, which is calculated based on the value of [`grpc-raft-conn-num`](#grpc-raft-conn-num). For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1. Accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. + + Starting from v8.5.4, the default value is adjusted to `grpc-raft-conn-num * 3 + 2`, which is calculated based on the value of [`grpc-raft-conn-num`](#grpc-raft-conn-num). For example, when the number of CPU cores is 8, the default value of `grpc-raft-conn-num` is 1. Accordingly, the default value of `grpc-concurrency` is `1 * 3 + 2 = 5`. + In v8.5.3 and earlier versions, the default value is `5`. + Minimum value: `1` @@ -174,7 +174,7 @@ This document only describes the parameters that are not included in command-lin + The maximum number of connections between TiKV nodes for Raft communication + Default value: - + Starting from v8.5.4 and v9.0.0, the default value is adjusted to `MAX(1, MIN(4, CPU cores / 8))`, where `MIN(4, CPU cores / 8)` indicates that when the number of CPU cores is greater than or equal to 32, the default maximum number of connections is 4. + + Starting from v8.5.4, the default value is adjusted to `MAX(1, MIN(4, CPU cores / 8))`, where `MIN(4, CPU cores / 8)` indicates that when the number of CPU cores is greater than or equal to 32, the default maximum number of connections is 4. + In v8.5.3 and earlier versions, the default value is `1`. + Minimum value: `1` diff --git a/tune-tikv-thread-performance.md b/tune-tikv-thread-performance.md index 8893d077306b3..5c96283e58108 100644 --- a/tune-tikv-thread-performance.md +++ b/tune-tikv-thread-performance.md @@ -42,7 +42,7 @@ Starting from TiKV v5.0, all read requests use the unified thread pool for queri * The gRPC thread pool. - Starting from v8.5.4 and v9.0.0, the default size of the gRPC thread pool (configured by `server.grpc-concurrency`) is changed from a fixed value of `5` to an adaptive value calculated based on the number of CPU cores. For the detailed calculation formula, see [`server.grpc-concurrency`](/tikv-configuration-file.md#grpc-concurrency). This thread pool has almost no computing overhead and is mainly responsible for network I/O and deserialization requests, so generally you do not need to adjust the default configuration. + Starting from v8.5.4, the default size of the gRPC thread pool (configured by `server.grpc-concurrency`) is changed from a fixed value of `5` to an adaptive value calculated based on the number of CPU cores. For the detailed calculation formula, see [`server.grpc-concurrency`](/tikv-configuration-file.md#grpc-concurrency). This thread pool has almost no computing overhead and is mainly responsible for network I/O and deserialization requests, so generally you do not need to adjust the default configuration. - If the machine deployed with TiKV has a small number (less than or equal to 8) of CPU cores, consider setting the `server.grpc-concurrency` configuration item to `2`. - If the machine deployed with TiKV has very high configuration, TiKV undertakes a large number of read and write requests, and the value of `gRPC poll CPU` that monitors Thread CPU on Grafana exceeds 80% of `server.grpc-concurrency`, then consider increasing the value of `server.grpc-concurrency` to keep the thread pool usage rate below 80% (that is, the metric on Grafana is lower than `80% * server.grpc-concurrency`).