sessionctx: default paging size bytes to 4 MiB#69868
Conversation
Signed-off-by: JmPotato <github@ipotato.me>
📝 WalkthroughWalkthroughThe ChangesPaging size configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 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 |
Signed-off-by: JmPotato <github@ipotato.me>
Signed-off-by: JmPotato <github@ipotato.me>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #69868 +/- ##
================================================
- Coverage 76.3208% 74.0034% -2.3174%
================================================
Files 2041 2056 +15
Lines 559977 578246 +18269
================================================
+ Hits 427379 427922 +543
- Misses 131697 149999 +18302
+ Partials 901 325 -576
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@JmPotato: The following tests 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: YuhaoZhang00 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 |
|
@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. |
What problem does this PR solve?
Issue Number: ref #68085
Problem Summary:
tidb_paging_size_bytescurrently defaults to0, leaving byte-budget paging disabled unless it is explicitly configured.Regression testing with paging enabled found no material performance regression in the tested cap-bound and under-cap TPC-C, FullScan, and Join workloads. Among the tested 1, 2, 4, 8, and 16 MiB candidates, 4 MiB had the lowest weighted score and the best overall balance across throughput, tail latency, RU stability, RPC overhead, CPU, RU efficiency, and worst-case behavior. It was not the winner of every individual metric; the recommendation is a robust default for the tested workload matrix rather than a claim of a universal optimum.
What changed and how does it work?
tidb_paging_size_bytesfrom0to 4 MiB.Setting this variable does not enable byte-budget paging for every workload. TiDB forwards the byte budget only when Resource Control is enabled and the active Resource Group is configured as non-burstable (has limited burst). Users can still explicitly set the variable to
0to disable byte-budget paging.Check List
Tests
Validated locally:
(cd tests/integrationtest && ./run-tests.sh -r sessionctx/setvar)(709 cases passed)make lintgit diff --check upstream/master...HEADSide effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit
New Features
Bug Fixes