From 2415d781308b673691ecc7abf9b0c6985da9eed6 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 10:39:14 +0800 Subject: [PATCH 01/11] 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 74a9f6a5ee9ca43cb1c2429dc3464106c1e8fdc2 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 10:39:19 +0800 Subject: [PATCH 02/11] 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 9a2dc96813bb840db8314455b446128d87be6f21 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Jan 2026 02:40:23 +0000 Subject: [PATCH 03/11] 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 5a650f13d4cd8..4a67a510776b2 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -151,7 +151,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` @@ -169,7 +172,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 cf34148fdb41e381b3468aa26c74e50953c9158e Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 10:51:21 +0800 Subject: [PATCH 04/11] 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 36dfc3dd5ce5a..2a72f45f83874 100644 --- a/tune-tikv-thread-performance.md +++ b/tune-tikv-thread-performance.md @@ -43,7 +43,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 ccb8c68923431430007f065517217fa189498c20 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:06:08 +0800 Subject: [PATCH 05/11] 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 4a67a510776b2..0106a0abeb8f5 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -151,9 +151,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` @@ -172,7 +172,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 ec71d08b9b43ceff6d1763519cae8e81844b69b2 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:12:02 +0800 Subject: [PATCH 06/11] 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 0106a0abeb8f5..aa84f0b6f7fe8 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -154,7 +154,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 1e3c9b80412635a5ce03f952efc377edb851e388 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:12:18 +0800 Subject: [PATCH 07/11] 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 aa84f0b6f7fe8..f1de791090854 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -154,6 +154,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 48ee478a8afc0b40591bad0a7aa5e1d85382ac90 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:16:49 +0800 Subject: [PATCH 08/11] 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 f1de791090854..77c32b0ebfc7a 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -151,9 +151,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` @@ -172,7 +173,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 173b414931736adbb797b5e3e483df45c1151dc0 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 11:21:33 +0800 Subject: [PATCH 09/11] 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 77c32b0ebfc7a..8c630809952e1 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -176,7 +176,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 7d1d801da8e013f4f25b5151090dd8b9803d1ad6 Mon Sep 17 00:00:00 2001 From: qiancai Date: Wed, 7 Jan 2026 11:56:10 +0800 Subject: [PATCH 10/11] 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 9bce76b87ee01..30f185135af1c 100644 --- a/best-practices/massive-regions-best-practices.md +++ b/best-practices/massive-regions-best-practices.md @@ -150,7 +150,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 1dc5e150f4bb2744789bfb351f26227f5bd77d7e Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 7 Jan 2026 14:16:22 +0800 Subject: [PATCH 11/11] 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 3fade7cac85d3..fbb0290d11e6a 100644 --- a/tune-tikv-memory-performance.md +++ b/tune-tikv-memory-performance.md @@ -41,7 +41,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