dm: add replication lag tuning guidance#22714
dm: add replication lag tuning guidance#22714joechenrh wants to merge 6 commits intopingcap:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request enhances the DM performance troubleshooting documentation by adding a new section on locating bottlenecks through metric analysis and providing detailed steps for diagnosing downstream execution issues in TiDB or TiKV clusters. The review feedback recommends consistent formatting by enclosing technical metric names in backticks to align with the style guide.
| If the bottleneck exists in downstream execution, check the TiDB or TiKV cluster before changing DM configurations: | ||
|
|
||
| - If TiDB CPU usage is already high, scale out TiDB first. | ||
| - If TiDB query latency or TiDB KV-client backoff is high, the bottleneck might exist in the TiDB SQL layer or in the TiDB-to-TiKV path. |
There was a problem hiding this comment.
For consistency and improved readability, please enclose metric names in backticks. This aligns with the formatting of other metrics in this document and the style guide's recommendation for technical terms.
| - If TiDB query latency or TiDB KV-client backoff is high, the bottleneck might exist in the TiDB SQL layer or in the TiDB-to-TiKV path. | |
| - If `TiDB query latency` or `TiDB KV-client backoff` is high, the bottleneck might exist in the TiDB SQL layer or in the TiDB-to-TiKV path. |
References
- The style guide recommends using backticks for technical terms like command names, options, and paths to ensure consistency and readability. This principle should be extended to metric names as well for consistency. (link)
|
|
||
| - If TiDB CPU usage is already high, scale out TiDB first. | ||
| - If TiDB query latency or TiDB KV-client backoff is high, the bottleneck might exist in the TiDB SQL layer or in the TiDB-to-TiKV path. | ||
| - If TiKV write path metrics such as write RPC latency, scheduler CPU usage, apply CPU usage, write stall, or PD TSO latency are high, check TiKV or PD before tuning DM. |
There was a problem hiding this comment.
To maintain consistency with the rest of the document, please wrap these metric names in backticks. This improves readability and follows the style guide's conventions for technical terms.
| - If TiKV write path metrics such as write RPC latency, scheduler CPU usage, apply CPU usage, write stall, or PD TSO latency are high, check TiKV or PD before tuning DM. | |
| - If TiKV write path metrics such as `write RPC latency`, `scheduler CPU usage`, `apply CPU usage`, `write stall`, or `PD TSO latency` are high, check TiKV or PD before tuning DM. |
References
- The style guide recommends using backticks for technical terms like command names, options, and paths to ensure consistency and readability. This principle should be extended to metric names as well for consistency. (link)
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?