Improve the observability of CPU consumption in region reads
Open
type/enhancement
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Enhancement Task
Currently, we have recorded CPU usage at TiKV since the last region heartbeat and reported it to PD:
https://github.com/tikv/tikv/blob/95a06da9a9365ce5b32ec670eb6aac44ebb45229/components/raftstore-v2/src/worker/pd/region.rs#L141-L155
We can now get it directly through the region meta within PD:
https://github.com/tikv/pd/blob/c53f203465f59018bbf57eab1507bd49a3b8ef85/pkg/core/region.go#L692-L699
Currently, access is limited to APIs such as pd-ctl. To improve cluster diagnostics, we should enhance observability of CPU usage during region reads—such as by adding relevant metrics to Grafana—to better identify hotspots within the cluster.
Contributor guide
Assessment
This issue has not been assessed yet.