diff --git a/experimental-features.md b/experimental-features.md index a2cab24e4b2fe..f2cfe8f8f1528 100644 --- a/experimental-features.md +++ b/experimental-features.md @@ -24,7 +24,8 @@ This document introduces the experimental features of TiDB in different versions ## Scheduling -Elastic scheduling feature. It enables the TiDB cluster to dynamically scale out and in on Kubernetes based on real-time workloads, which effectively reduces the stress during your application's peak hours and saves overheads. See [Enable TidbCluster Auto-scaling](https://docs.pingcap.com/tidb-in-kubernetes/stable/enable-tidb-cluster-auto-scaling) for details. (Introduced in v4.0) ++ Elastic scheduling feature. It enables the TiDB cluster to dynamically scale out and in on Kubernetes based on real-time workloads, which effectively reduces the stress during your application's peak hours and saves overheads. See [Enable TidbCluster Auto-scaling](https://docs.pingcap.com/tidb-in-kubernetes/stable/enable-tidb-cluster-auto-scaling) for details. (Introduced in v4.0) ++ Balance hot Region scheduling by using the v2 algorithm in PD. See [`scheduler config balance-hot-region-scheduler`](/pd-control.md#scheduler-config-balance-hot-region-scheduler) for details. (Introduced in v6.3) ## SQL diff --git a/pd-control.md b/pd-control.md index 9cc88f31443f9..b32c2f7c02e5f 100644 --- a/pd-control.md +++ b/pd-control.md @@ -834,7 +834,8 @@ Usage: "key" ], "strict-picking-store": "true", - "enable-for-tiflash": "true" + "enable-for-tiflash": "true", + "rank-formula-version": "v1" } ``` @@ -893,12 +894,26 @@ Usage: scheduler config balance-hot-region-scheduler set read-priorities query,byte ``` -- `strict-picking-store` controls the search space of hot Region scheduling. Usually, it is enabled. When it is enabled, hot Region scheduling ensures hotspot balance on the two configured dimensions. When it is disabled, hot Region scheduling only ensures the balance on the dimension with the first priority, which might reduce balance on other dimensions. Usually, you do not need to modify this configuration. +- `strict-picking-store` controls the search space of hot Region scheduling. Usually, it is enabled. This configuration item only affects the behavior when `rank-formula-version` is `v1`. When it is enabled, hot Region scheduling ensures hot Region balance on the two configured dimensions. When it is disabled, hot Region scheduling only ensures the balance on the dimension with the first priority, which might reduce balance on other dimensions. Usually, you do not need to modify this configuration. ```bash scheduler config balance-hot-region-scheduler set strict-picking-store true ``` +- `rank-formula-version` controls which scheduler algorithm version is used in hot Region scheduling. Value options are `v1` and `v2`. The default value is `v1`. + + - The `v1` algorithm is the scheduler strategy used in TiDB v6.3.0 and earlier versions. This algorithm mainly focuses on reducing load difference between stores and avoids introducing side effects in the other dimension. + - The `v2` algorithm is an experimental scheduler strategy introduced in TiDB v6.3.0. This algorithm mainly focuses on improving the rate of the equitability between stores and factors in few side effects. Compared with the `v1` algorithm with `strict-picking-store` being `true`, the `v2` algorithm pays more attention to the priority equalization of the first dimension. Compared with the `v1` algorithm with `strict-picking-store` being `false`, the `v2` algorithm considers the balance of the second dimension. + - The `v1` algorithm with `strict-picking-store` being `true` is conservative and scheduling can only be generated when there is a store with a high load in both dimensions. In certain scenarios, it might be impossible to continue balancing due to dimensional conflicts. To achieve better balancing in the first dimension, it is necessary to set the `strict-picking-store` to `false`. The `v2` algorithm can achieve better balancing in both dimensions and reduce invalid scheduling. + + > **Warning:** + > + > Setting `rank-formula-version` to `v2` is an experimental feature. It is not recommended that you use it for production environments. + + ```bash + scheduler config balance-hot-region-scheduler set rank-formula-version v2 + ``` + - `enable-for-tiflash` controls whether hot Region scheduling takes effect for TiFlash instances. Usually, it is enabled. When it is disabled, the hot Region scheduling between TiFlash instances is not performed. ```bash