resourcemanager: fix client allocation under service limits - #11213
resourcemanager: fix client allocation under service limits#11213JmPotato wants to merge 2 commits into
Conversation
Bound the client allocation budget by the service burst override for burstable groups. Use the resulting shares for capacity, tokens and the original group fill rate. Preserve group refill and the loan algorithm; individual clients receive loan shares matching their new allocations. Cover demand-sensitive allocation and the unaffected allocation paths. Signed-off-by: JmPotato <github@ipotato.me>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughToken allocation now uses an explicit budget derived from the group fill rate. Service-limited burstable groups cap this budget at the overridden burst limit. Tests cover allocation, proportional capacity, and client removal across multiple configurations. ChangesService-limited allocation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change caps allocation for service-limited burstable resource groups so client shares remain demand-sensitive under very large fill rates. No current merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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 |
|
@coderabbitai[bot]: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Signed-off-by: JmPotato <github@ipotato.me>
|
@JmPotato: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11213 +/- ##
==========================================
+ Coverage 79.69% 79.74% +0.04%
==========================================
Files 544 544
Lines 78809 78815 +6
==========================================
+ Hits 62809 62848 +39
+ Misses 11646 11616 -30
+ Partials 4354 4351 -3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@YuhaoZhang00: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[LGTM Timeline notifier]Timeline:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: coderabbitai[bot], rleungx, YuhaoZhang00 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: close #11211
A burstable group with a very large fill rate can split its finite Service Limit bucket capacity almost equally between clients, causing a busy TiDB instance to wait for RU tokens while aggregate consumption remains below the limit.
What is changed and how does it work?
For a group with
F = MaxInt32, a 160K service budget, and client demands of 50K/25K RU/s, capacities become 92.5K/67.5K RU. Unused budget is still shared evenly.Check List
Tests
Manual validation used a single-host TiDB X cluster with NextGen PD/TiDB, CSE TiKV, MinIO, and two business TiDB instances in the same keyspace:
The smaller payload and service budget avoid the storage bottleneck observed with 128 KiB writes in this single-host setup. This validates client allocation and service limiting, with no claim of production storage performance.
Release note
Summary by CodeRabbit
Bug Fixes
Tests