What is the meaning of resource_manager_resource_unit?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: resource_manager_resource_unit 含义?

| username: ShawnYan

【TiDB Usage Environment】Production Environment / Testing / Poc
【TiDB Version】
【Reproduction Path】What operations were performed when the issue occurred
【Encountered Issue: Problem Phenomenon and Impact】
【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshots/Logs/Monitoring】

Error 1105 (HY000): metrics ‘resource_manager_resource_unit’ is empty
What does this error mean? There is no relevant explanation in the documentation.

tidb log:
[2023/06/27 23:08:58.552 +08:00] [INFO] [conn.go:1184] [“command dispatched failed”] [conn=7548864206263550385] [connInfo=“id:7548864206263550385, addr:192.168.8.171:53890 status:10, collation:utf8mb4_general_ci, user:root”] [command=Query] [status=“inTxn:0, autocommit:1”] [sql=“calibrate resource start_time ‘2023-06-27 22:38:58’ end_time ‘2023-06-27 23:08:59’”] [txn_mode=PESSIMISTIC] [timestamp=0] [err=“metrics ‘resource_manager_resource_unit’ is empty\ngithub.com/pingcap/tidb/executor.getValuesFromMetrics\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/calibrate_resource.go:343\ngithub.com/pingcap/tidb/executor.getRUPerSec\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/calibrate_resource.go:317\ngithub.com/pingcap/tidb/executor.(*calibrateResourceExec).dynamicCalibrate\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/calibrate_resource.go:214\ngithub.com/pingcap/tidb/executor.(*calibrateResourceExec).Next\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/calibrate_resource.go:193\ngithub.com/pingcap/tidb/executor.Next\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/executor.go:326\ngithub.com/pingcap/tidb/executor.(*ExecStmt).next\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:1194\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:150\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/driver_tidb.go:428\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2308\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultSet\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2251\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2124\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1885\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1372\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1153\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:677\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598”]

| username: 有猫万事足 | Original post link

It should require the cluster to have a certain load to estimate.

| username: ShawnYan | Original post link

That’s right, otherwise this table would be empty.

mysql> select * from metrics_schema.resource_manager_resource_unit;
+----------------------------+----------------------+
| time                       | value                |
+----------------------------+----------------------+
| 2023-06-28 00:35:16.666000 |                    0 |
| 2023-06-28 00:36:16.666000 | 0.004957504103305845 |
+----------------------------+----------------------+
2 rows in set (0.01 sec)
| username: ShawnYan | Original post link

It is recommended to add a description here in the documentation, including this error (Error 1105 (HY000): metrics 'resource_manager_resource_unit' is empty).

After all, other error documentation also includes descriptions.

| username: yilong | Original post link

Hello:
Thank you for your feedback. This note will be added to the documentation later.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.