-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sessionctx,infoschema: change @@tidb_schema_cache_size lower bound to 64MB #56316
Conversation
Hi @tiancaiamao. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #56316 +/- ##
================================================
+ Coverage 73.3850% 76.2698% +2.8847%
================================================
Files 1605 1641 +36
Lines 445291 462689 +17398
================================================
+ Hits 326777 352892 +26115
+ Misses 98457 88268 -10189
- Partials 20057 21529 +1472
Flags with carried forward coverage won't be shown. Click here to find out more.
|
[LGTM Timeline notifier]Timeline:
|
/test unit-test |
@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an In 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CbcWestwolf, lance6716, wjhuang2016 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an In 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. |
/retest |
@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an In 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. |
/ok-to-test |
What problem does this PR solve?
Issue Number: ref #50959
Problem Summary:
What changed and how does it work?
I've tested the relationship between schema cache size and active tables been keep in-memory.
On average, 1M schema cache size can cache 926 active tables.
So 64MB schema cache size can keep nearly 60K active tables in memory.
128MB schema cache size can keep nearly 120K active tables in memory.
The default schema cache size is still 512MB which is large enough for 475K active tables.
This change makes it easier to cover cache miss cases.
Check List
Tests
Test different table numbers and check the corresponding @@tidb_schema_cache_size can make them all in-memory.
(This can be verified by check the metrics with active workload visiting a varity of tables)
Test with 1M tables with workload visiting tables [0-500000] in 0-2min, tables [500000-1000000) in 2-4min, and than [0-500000] again in 4-6min ... change the table range every 2min and watch the cache miss behaviour:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.