hot read 分布不均匀

  • 【TiDB 版本】:v4.0.6
  • 【问题描述】:

集群 hot read 分布不均匀,这个要怎么处理?

下面是监控截图和一些配置:

CPU使用率集中在一个节点

热点写

热点读

配置:

» scheduler show
[
“balance-hot-region-scheduler”,
“balance-leader-scheduler”,
“label-scheduler”
]

» config show
{
“replication”: {
“enable-placement-rules”: “false”,
“location-labels”: “”,
“max-replicas”: 3,
“strictly-match-label”: “false”
},
“schedule”: {
“enable-cross-table-merge”: “false”,
“enable-debug-metrics”: “false”,
“enable-location-replacement”: “true”,
“enable-make-up-replica”: “true”,
“enable-one-way-merge”: “false”,
“enable-remove-down-replica”: “true”,
“enable-remove-extra-replica”: “true”,
“enable-replace-offline-replica”: “true”,
“high-space-ratio”: 0.7,
“hot-region-cache-hits-threshold”: 3,
“hot-region-schedule-limit”: 4,
“leader-schedule-limit”: 4,
“leader-schedule-policy”: “count”,
“low-space-ratio”: 0.8,
“max-merge-region-keys”: 200000,
“max-merge-region-size”: 20,
“max-pending-peer-count”: 16,
“max-snapshot-count”: 3,
“max-store-down-time”: “30m0s”,
“merge-schedule-limit”: 8,
“patrol-region-interval”: “100ms”,
“region-schedule-limit”: 2048,
“replica-schedule-limit”: 64,
“scheduler-max-waiting-operator”: 5,
“split-merge-interval”: “1h0m0s”,
“store-limit-mode”: “manual”,
“tolerant-size-ratio”: 0
}
}

热点问题的话,有比较多的资料,可以先参考资料排查一下

https://book.tidb.io/session4/chapter7/hotspot-resolved.html#72-热点问题处理思路

https://pingcap.com/docs-cn/stable/troubleshoot-hot-spot-issues/#tidb-

原因找到到了,是因为业务在刷全表的数据导致的。

:+1::+1::+1:

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。