client/resource_group: add client-side demand observability#10604
client/resource_group: add client-side demand observability#10604okJiang wants to merge 2 commits intotikv:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
[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 |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: okjiang <819421878@qq.com>
What problem does this PR solve?
Issue Number: ref #10488, ref #10581
Resource control observability on the client side does not show the difference between real demand and post-throttling consumption. It is also hard to tell whether pressure is local to one TiDB instance or spread across the whole resource group.
What is changed and how does it work?
This PR adds client-side metrics and slow-path logs so we can explain demand, limiter state, and per-instance pressure before requests are throttled.
It includes:
demand_ru_per_secmetric collected beforeReserve()Check List
Tests
Manual test:
tiup playgroundsetup with 3 PD, 2 TiDB, and 3 TiKV.demand_ru_per_sec > fill_rate, higher client wait, and throttling on the hot TiDB instance.Code changes
Side effects
Related changes
pingcap/docs/pingcap/docs-cn:pingcap/tiup:Release note