region balance ratio比较大,但是没有新增和删除节点

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

您好: pd-ctl 查看 store 命令,可以检查每个store当前的region数量 是否均衡.

» store { “count”: 7, “stores”: [ { “store”: { “id”: 1, “address”: “172.22.0.86:20160”, “version”: “2.1.14”, “state_name”: “Up” }, “status”: { “capacity”: “492 GiB”, “available”: “183 GiB”, “leader_count”: 5396, “leader_weight”: 1, “leader_score”: 400035, “leader_size”: 400035, “region_count”: 16014, “region_weight”: 1, “region_score”: 152876180.90344763, “region_size”: 1184151, “start_ts”: “2019-07-08T16:53:31+08:00”, “last_heartbeat_ts”: “2020-04-07T10:28:26.037683904+08:00”, “uptime”: “6569h34m55.037683904s” } }, { “store”: { “id”: 4, “address”: “172.22.0.87:20160”, “version”: “2.1.14”, “state_name”: “Up” }, “status”: { “capacity”: “492 GiB”, “available”: “184 GiB”, “leader_count”: 5031, “leader_weight”: 1, “leader_score”: 400013, “leader_size”: 400013, “region_count”: 15001, “region_weight”: 1, “region_score”: 141878380.6053996, “region_size”: 1127911, “start_ts”: “2019-07-08T16:53:32+08:00”, “last_heartbeat_ts”: “2020-04-07T10:28:31.360194678+08:00”, “uptime”: “6569h34m59.360194678s” } }, { “store”: { “id”: 5, “address”: “172.22.0.85:20160”, “version”: “2.1.14”, “state_name”: “Up” }, “status”: { “capacity”: “492 GiB”, “available”: “185 GiB”, “leader_count”: 5327, “leader_weight”: 1, “leader_score”: 400168, “leader_size”: 400168, “region_count”: 15469, “region_weight”: 1, “region_score”: 134192215.42940426, “region_size”: 1146002, “sending_snap_count”: 1, “start_ts”: “2019-07-08T16:53:31+08:00”, “last_heartbeat_ts”: “2020-04-07T10:28:31.521290606+08:00”, “uptime”: “6569h35m0.521290606s” } }, { “store”: { “id”: 118784, “address”: “172.22.0.92:20160”, “version”: “2.1.14”, “state_name”: “Up” }, “status”: { “capacity”: “492 GiB”, “available”: “183 GiB”, “leader_count”: 5379, “leader_weight”: 1, “leader_score”: 400108, “leader_size”: 400108, “region_count”: 17043, “region_weight”: 1, “region_score”: 153665231.6424322, “region_size”: 1259864, “start_ts”: “2020-01-10T17:16:32+08:00”, “last_heartbeat_ts”: “2020-04-07T10:28:26.799357372+08:00”, “uptime”: “2105h11m54.799357372s” } }, { “store”: { “id”: 118785, “address”: “172.22.0.91:20160”, “version”: “2.1.14”, “state_name”: “Up” }, “status”: { “capacity”: “492 GiB”, “available”: “184 GiB”, “leader_count”: 5677, “leader_weight”: 1, “leader_score”: 400255, “leader_size”: 400255, “region_count”: 16875, “region_weight”: 1, “region_score”: 137233346.8793311, “region_size”: 1235859, “receiving_snap_count”: 1, “start_ts”: “2020-01-10T17:16:32+08:00”, “last_heartbeat_ts”: “2020-04-07T10:28:31.520161169+08:00”, “uptime”: “2105h11m59.520161169s” } }, { “store”: { “id”: 167804, “address”: “172.22.0.94:20160”, “version”: “2.1.14”, “state_name”: “Up” }, “status”: { “capacity”: “492 GiB”, “available”: “183 GiB”, “leader_count”: 5569, “leader_weight”: 1, “leader_score”: 400334, “leader_size”: 400334, “region_count”: 16489, “region_weight”: 1, “region_score”: 155515993.06819582, “region_size”: 1209959, “start_ts”: “2020-01-14T14:01:37+08:00”, “last_heartbeat_ts”: “2020-04-07T10:28:31.138060923+08:00”, “uptime”: “2012h26m54.138060923s” } }, { “store”: { “id”: 167805, “address”: “172.22.0.93:20160”, “version”: “2.1.14”, “state_name”: “Up” }, “status”: { “capacity”: “492 GiB”, “available”: “181 GiB”, “leader_count”: 5547, “leader_weight”: 1, “leader_score”: 400730, “leader_size”: 400730, “region_count”: 16891, “region_weight”: 1, “region_score”: 176259255.97348452, “region_size”: 1241439, “start_ts”: “2020-01-14T14:01:37+08:00”, “last_heartbeat_ts”: “2020-04-07T10:28:26.893287716+08:00”, “uptime”: “2012h26m49.893287716s” } } ] }

  1. 从store 结果看 region count基本是均衡的,没有这么高的比率 2.Leader Balance Ratio 和 Region Balance Ratio 的监控度量已经不再新版里面体现了,因为是这个度量的算法有问题。建议忽略,以 TiKV-details -> Cluster -> leader count /region count 为准