Skip to content

pd: document CPU-aware hot region scheduling#21758

Open
qiancai wants to merge 8 commits into
pingcap:masterfrom
qiancai:docs/cpu-aware-hot-region-scheduling-v857-23140
Open

pd: document CPU-aware hot region scheduling#21758
qiancai wants to merge 8 commits into
pingcap:masterfrom
qiancai:docs/cpu-aware-hot-region-scheduling-v857-23140

Conversation

@qiancai

@qiancai qiancai commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

This PR is translated from: pingcap/docs#23140

What is changed, added or deleted? (Required)

Document CPU-aware Hot Region scheduling for read hotspots introduced in v8.5.7:

  • Add flow_cpu and cpu-read-rate output descriptions for pd-ctl hot.
  • Add min-hot-cpu-rate, cpu-rate-rank-step-ratio, and CPU-aware read-priorities behavior for balance-hot-region-scheduler.
  • Add troubleshooting guidance for CPU-aware read hotspot scheduling.
  • Add the Store read cpu panel description in the PD Grafana dashboard doc.

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v8.5 (TiDB 8.5 versions)

Need cherry-pick to release-8.5 because the feature is requested for v8.5.7.

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Add a release note
  • Add or modify documentation for a feature

Which TiDB components does this PR affect?

  • TiDB
  • PD
  • TiKV

How do you ensure that your changes are correct? (Required)

  • Checked local /home/lhy1024/pd and /home/lhy1024/tikv implementation for fields, defaults, and version fallback behavior.
  • Ran ./scripts/markdownlint pd-control.md troubleshoot-hot-spot-issues.md grafana-pd-dashboard.md.
  • Ran git diff --check.

@qiancai qiancai added area/scheduling Indicates that the Issue or PR belongs to the area of scheduling. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. translation/from-docs This PR is translated from a PR in pingcap/docs. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. labels Jul 2, 2026
@ti-chi-bot ti-chi-bot Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 2, 2026
@qiancai qiancai self-assigned this Jul 2, 2026
Synced from: pingcap/docs#23140
Target PR: pingcap#21758
AI Provider: azure

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Auto-sync completed successfully

Source PR: pingcap/docs#23140
Target PR: #21758

Chinese documentation has been updated based on English documentation changes.

@ti-chi-bot

ti-chi-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from qiancai. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 2, 2026
Comment thread pd-control.md Outdated
Comment thread troubleshoot-hot-spot-issues.md Outdated
Comment thread troubleshoot-hot-spot-issues.md Outdated
Comment thread pd-control.md Outdated
Comment thread troubleshoot-hot-spot-issues.md Outdated
Comment thread grafana-pd-dashboard.md Outdated
Comment thread pd-control.md Outdated
Comment thread pd-control.md Outdated

@lhy1024 lhy1024 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rest LGTM

Comment on lines +179 to +185

从 v8.5.7 和 v9.0.0 开始,针对读热点,PD 支持基于 TiKV CPU 使用情况的热点 Region 调度。TiKV 在 Store 心跳中上报每个 Region 的读 CPU 使用情况,PD 可将 CPU 使用情况作为调度维度之一。该机制有助于 PD 识别出那些 QPS 或字节吞吐量看似均衡、但 TiKV CPU 使用量仍不均衡的读热点,例如包含不同 CPU 开销的负载,或不同 TiKV 节点处理不同负载模式的集群。

- 对于支持上报读 CPU 使用情况的集群,`balance-hot-region-scheduler` 的默认 `read-priorities` 值为 `cpu,byte`。
- 对于不支持上报读 CPU 使用情况的集群,PD 会自动回退到 `query,byte`;如果集群也不支持 `query` 维度,则回退到 `byte,key`。

如需查看或调整调度维度,请使用 [`pd-ctl scheduler config balance-hot-region-scheduler`](/pd-control.md#scheduler-config-balance-hot-region-scheduler)。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

忽然意识到这个是不是单独一段比较好

Comment thread troubleshoot-hot-spot-issues.md Outdated
Co-authored-by: lhy1024 <lhylhy1024@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scheduling Indicates that the Issue or PR belongs to the area of scheduling. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/from-docs This PR is translated from a PR in pingcap/docs. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants