From 8be766c7fd746f282b6440b0c626b6f7af6f7cae Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 6 Dec 2024 14:55:13 +0800 Subject: [PATCH 1/5] pd: add patrol-region-worker-count Signed-off-by: Aolin --- dynamic-config.md | 3 ++- pd-configuration-file.md | 11 ++++++++++- pd-control.md | 10 ++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dynamic-config.md b/dynamic-config.md index 0c19ecfb88a77..93878ef0e6187 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -280,7 +280,8 @@ The following PD configuration items can be modified dynamically: | `cluster-version` | The cluster version | | `schedule.max-merge-region-size` | Controls the size limit of `Region Merge` (in MiB) | | `schedule.max-merge-region-keys` | Specifies the maximum numbers of the `Region Merge` keys | -| `schedule.patrol-region-interval` | Determines the frequency at which `replicaChecker` checks the health state of a Region | +| `schedule.patrol-region-interval` | Determines the frequency at which the checker inspects the health state of a Region | +| `scheduler.patrol-region-worker-count` | Controls the number of concurrent operators created by the checker when inspecting the health state of a Region | | `schedule.split-merge-interval` | Determines the time interval of performing split and merge operations on the same Region | | `schedule.max-snapshot-count` | Determines the maximum number of snapshots that a single store can send or receive at the same time | | `schedule.max-pending-peer-count` | Determines the maximum number of pending peers in a single store | diff --git a/pd-configuration-file.md b/pd-configuration-file.md index fae926046fa51..aeef49c1f4771 100644 --- a/pd-configuration-file.md +++ b/pd-configuration-file.md @@ -278,9 +278,18 @@ Configuration items related to scheduling ### `patrol-region-interval` -+ Controls the running frequency at which `replicaChecker` checks the health state of a Region. The smaller this value is, the faster `replicaChecker` runs. Normally, you do not need to adjust this parameter. ++ Controls the running frequency at which the checker inspects the health state of a Region. The smaller this value is, the faster the checker runs. Normally, you do not need to adjust this configuration. + Default value: `10ms` +### `patrol-region-worker-count` New in v8.5.0 + +> **Warning:** +> +> Setting this configuration item to a value greater than 1 enables concurrent checks. This is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/tikv/ps/issues) on GitHub. + ++ Controls the number of concurrent operators created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. ++ Default value: `1` + ### `split-merge-interval` + Controls the time interval between the `split` and `merge` operations on the same Region. That means a newly split Region will not be merged for a while. diff --git a/pd-control.md b/pd-control.md index 32b5f1faaadc4..a22f8032a04c4 100644 --- a/pd-control.md +++ b/pd-control.md @@ -232,10 +232,16 @@ Usage: config set region-score-formula-version v2 ``` -- `patrol-region-interval` controls the execution frequency that `replicaChecker` checks the health status of Regions. A shorter interval indicates a higher execution frequency. Generally, you do not need to adjust it. +- `patrol-region-interval` controls the execution frequency that the checker inspects the health status of Regions. A shorter interval indicates a higher execution frequency. Generally, you do not need to adjust it. ```bash - config set patrol-region-interval 10ms // Set the execution frequency of replicaChecker to 10ms + config set patrol-region-interval 10ms // Set the execution frequency of checker to 10ms + ``` + +- `patrol-region-worker-count` controls the number of concurrent operators created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. Setting this configuration item to a value greater than 1 enables concurrent checks. Currently, this feature is experimental, and it is not recommended that you use it in the production environment. + + ```bash + config set patrol-region-worker-count 2 // Set the checker concurrency to 2 ``` - `max-store-down-time` controls the time that PD decides the disconnected store cannot be restored if exceeded. If PD does not receive heartbeats from a store within the specified period of time, PD adds replicas in other nodes. From a59be532d977071210cd09a7786df3044798244c Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 6 Dec 2024 15:22:25 +0800 Subject: [PATCH 2/5] fix typo Co-authored-by: lhy1024 --- pd-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pd-configuration-file.md b/pd-configuration-file.md index aeef49c1f4771..8c67a3252fd44 100644 --- a/pd-configuration-file.md +++ b/pd-configuration-file.md @@ -285,7 +285,7 @@ Configuration items related to scheduling > **Warning:** > -> Setting this configuration item to a value greater than 1 enables concurrent checks. This is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/tikv/ps/issues) on GitHub. +> Setting this configuration item to a value greater than 1 enables concurrent checks. This is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/tikv/pd/issues) on GitHub. + Controls the number of concurrent operators created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. + Default value: `1` From fcd6e5139c591bb806e42e068ed6a42f533d91bf Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 9 Dec 2024 16:29:55 +0800 Subject: [PATCH 3/5] Apply suggestions from code review --- pd-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pd-configuration-file.md b/pd-configuration-file.md index 8c67a3252fd44..8ab97d9b0385d 100644 --- a/pd-configuration-file.md +++ b/pd-configuration-file.md @@ -287,7 +287,7 @@ Configuration items related to scheduling > > Setting this configuration item to a value greater than 1 enables concurrent checks. This is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/tikv/pd/issues) on GitHub. -+ Controls the number of concurrent operators created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. ++ Controls the number of concurrent [operators](/glossary.md#operator) created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. + Default value: `1` ### `split-merge-interval` From aa26850bcd763d90a512e3baa608b95422af1cb6 Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 10 Dec 2024 15:10:00 +0800 Subject: [PATCH 4/5] Apply suggestions from code review --- pd-control.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pd-control.md b/pd-control.md index a22f8032a04c4..5e2b40f8e481e 100644 --- a/pd-control.md +++ b/pd-control.md @@ -238,7 +238,7 @@ Usage: config set patrol-region-interval 10ms // Set the execution frequency of checker to 10ms ``` -- `patrol-region-worker-count` controls the number of concurrent operators created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. Setting this configuration item to a value greater than 1 enables concurrent checks. Currently, this feature is experimental, and it is not recommended that you use it in the production environment. +- `patrol-region-worker-count` controls the number of concurrent [operators](/glossary.md#operator) created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. Setting this configuration item to a value greater than 1 enables concurrent checks. Currently, this feature is experimental, and it is not recommended that you use it in the production environment. ```bash config set patrol-region-worker-count 2 // Set the checker concurrency to 2 From 77a46ec138e86ddb696e29161ad5ca99da2c468e Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 10 Dec 2024 15:37:54 +0800 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Grace Cai --- pd-control.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pd-control.md b/pd-control.md index 5e2b40f8e481e..253a6bbb26019 100644 --- a/pd-control.md +++ b/pd-control.md @@ -235,7 +235,7 @@ Usage: - `patrol-region-interval` controls the execution frequency that the checker inspects the health status of Regions. A shorter interval indicates a higher execution frequency. Generally, you do not need to adjust it. ```bash - config set patrol-region-interval 10ms // Set the execution frequency of checker to 10ms + config set patrol-region-interval 10ms // Set the execution frequency of the checker to 10ms ``` - `patrol-region-worker-count` controls the number of concurrent [operators](/glossary.md#operator) created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. Setting this configuration item to a value greater than 1 enables concurrent checks. Currently, this feature is experimental, and it is not recommended that you use it in the production environment.