resource-manager: price remote read bytes separately#11018
Conversation
Signed-off-by: Yuhao Zhang <yhzhang00@outlook.com>
|
[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 |
|
Hi @YuhaoZhang00. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
📝 WalkthroughWalkthroughChangesRemote Read RU Accounting
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ResponseInfo
participant KVCalculator
participant RUConfig
ResponseInfo->>KVCalculator: report total and remote read bytes
KVCalculator->>RUConfig: apply local and remote read cost rates
KVCalculator-->>ResponseInfo: record total read bytes and CPU usage
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11018 +/- ##
==========================================
+ Coverage 79.22% 79.26% +0.03%
==========================================
Files 541 541
Lines 75965 76000 +35
==========================================
+ Hits 60187 60243 +56
+ Misses 11531 11519 -12
+ Partials 4247 4238 -9
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/check-issue-triage-complete |
What problem does this PR solve?
Issue Number: close #11019
Remote coprocessor reads currently use the same RU-v1 byte price as local reads, so the resource manager cannot price the two factual byte subsets independently.
What is changed and how does it work?
read-cost-per-byte-remoterequest-unit configuration. When omitted, the controller uses 0.5× the normal read-byte price; an explicit zero remains valid.base + local_bytes * normal_rate + remote_bytes * remote_rate + CPU; paging precharge and token-bucket behavior are unchanged.Check List
Tests
Code changes
Release note
Summary by CodeRabbit
New Features
read-cost-per-byte-remoteconfiguration setting, including support for explicit zero values.Tests