-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
planner,util/ranger: reduce mem allocs on rebuildRange #58362
Conversation
Signed-off-by: zyguan <zhongyangguan@gmail.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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @zyguan. 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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #58362 +/- ##
================================================
+ Coverage 73.2259% 73.6063% +0.3803%
================================================
Files 1675 1675
Lines 462254 466298 +4044
================================================
+ Hits 338490 343225 +4735
+ Misses 102989 102226 -763
- Partials 20775 20847 +72
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: zyguan <zhongyangguan@gmail.com>
@zyguan: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
The plan cache is going to be instance level. I think this is not resonable for instance level plan cache? |
I'm not sure, but the instance-level plan cache also need to This is a draft PR to show the issue of util/ranger, a possible solution and the improvement can be archived by it. After discussing with @cfzjywxk and @qw4990 , we think the risk of this PR outweighs the benefits, so no plan to move forward. |
What problem does this PR solve?
Issue Number: ref #56649
Problem Summary: A lot of small objects will be allocated when
rebuildRange
, which leads to notable runtime overhead. See the following cpu profile of a index-scan workload (nearly half of rebuildRange time is spent on mallocgc).What changed and how does it work?
Introduce a planctx level allocator for allocating/reusing range releated objects, includes:
point
[]*point
(len <= 4)Range
converted from points (with single low/high value)After this PR, the cpu profile of the same benchmark can be:
The heap alloc metrics are shown as the following:
Here are benchmark results:
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.