tikv / tikv/pd

Improve the observability of CPU consumption in region reads

Open
#9,442 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.