diff --git a/dashboard/dashboard-resource-manager.md b/dashboard/dashboard-resource-manager.md index a1a7621602d05..043af01b0f3aa 100644 --- a/dashboard/dashboard-resource-manager.md +++ b/dashboard/dashboard-resource-manager.md @@ -59,6 +59,8 @@ Before resource planning, you need to know the overall capacity of the cluster. - When the workload within the time window is too low, the following error is displayed `ERROR 1105 (HY000): The workload in selected time window is too low, with which TiDB is unable to reach a capacity estimation; please select another time window with higher workload, or calibrate resource by hardware instead` is displayed. + - The capacity estimation based on actual workload needs to Prometheus metric data, including `resource_manager_resource_unit`, `process_cpu_usage`, `tikv_cpu_quota`, and `tidb_server_maxprocs`. If the corresponding metrics data is empty, an error is displayed indicating the name of the metrics item, for example `Error 1105 (HY000): metrics 'resource_manager_resource_unit' is empty`. And `resource_manager_resource_unit` is empty when no workload, so this error will also be reported. In addition, TiKV does not monitor CPU usage metrics on macOS, it does not support capacity estimation based on actual workload and the following error is displayed `ERROR 1105 (HY000): metrics 'process_cpu_usage' is empty`. + You can select an appropriate time range using **CPU Usage** in the [Metrics](#metrics) section. ## Metrics diff --git a/sql-statements/sql-statement-calibrate-resource.md b/sql-statements/sql-statement-calibrate-resource.md index 9f4bb05e44e87..653f581eec39f 100644 --- a/sql-statements/sql-statement-calibrate-resource.md +++ b/sql-statements/sql-statement-calibrate-resource.md @@ -47,6 +47,10 @@ If your application is already running in a production environment, or you can r - The time window ranges from 10 minutes to 24 hours. - In the specified time window, if the CPU utilization of TiDB and TiKV is too low, you cannot estimate the capacity. +> **Note:** +> +> TiKV does not monitor CPU usage metrics on macOS, it does not support capacity estimation based on actual workload on macOS. + ### Estimate capacity based on hardware deployment This method mainly estimates capacity based on the current cluster configuration, combined with the empirical values observed for different workloads. Because different types of workloads require different ratios of hardware, the output capacity of the same configuration of hardware might be different. The `WORKLOAD` parameter here accepts the following different workload types. The default value is `TPCC`. @@ -102,6 +106,15 @@ CALIBRATE RESOURCE START_TIME '2023-04-18 08:00:00' DURATION '60m'; ERROR 1105 (HY000): The workload in selected time window is too low, with which TiDB is unable to reach a capacity estimation; please select another time window with higher workload, or calibrate resource by hardware instead ``` +The capacity estimation needs to Prometheus metric data, including `resource_manager_resource_unit`, `process_cpu_usage`, `tikv_cpu_quota`, and `tidb_server_maxprocs`. If the corresponding metrics data is empty, an error is displayed indicating the name of the metrics item as shown in the following example. And `resource_manager_resource_unit` is empty when no workload, so this error will also be reported. + +```sql +CALIBRATE RESOURCE START_TIME '2023-04-18 08:00:00' DURATION '60m'; +Error 1105 (HY000): metrics 'resource_manager_resource_unit' is empty +``` + +TiKV does not monitor CPU usage metrics on macOS. An error indicating the name of the metrics item is shown in the following example. + Specify `WORKLOAD` to view the RU capacity. The default value is `TPCC`. ```sql