Skip to content
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

executor, indexusage: don't load stats for point get index usage reporter #58478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Dec 23, 2024

What problem does this PR solve?

Issue Number: close #58477

Problem Summary:

As described in the issue, maybe load stats is too slow for point get requests.

What changed and how does it work?

  1. Don't load stats for point get requests.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

It has been covered by existing tests.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label Dec 23, 2024
@YangKeao
Copy link
Member Author

TODO: performance test

Copy link

ti-chi-bot bot commented Dec 23, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from yangkeao, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 23, 2024
@YangKeao YangKeao marked this pull request as draft December 23, 2024 09:13
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.5549%. Comparing base (91706ec) to head (d3e7296).
Report is 2 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58478        +/-   ##
================================================
+ Coverage   73.1476%   73.5549%   +0.4072%     
================================================
  Files          1678       1678                
  Lines        464086     464188       +102     
================================================
+ Hits         339468     341433      +1965     
+ Misses       103772     101917      -1855     
+ Partials      20846      20838         -8     
Flag Coverage Δ
integration 42.9381% <45.4545%> (?)
unit 72.3307% <100.0000%> (-0.0093%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.6939% <ø> (-0.0450%) ⬇️

@YangKeao YangKeao force-pushed the not-load-stats-for-point-get branch from f712b3f to 14485c4 Compare December 23, 2024 13:04
@YangKeao YangKeao marked this pull request as ready for review January 13, 2025 12:08
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 13, 2025
@YangKeao
Copy link
Member Author

The automatic test doesn't give a good result 🤔 . Maybe the improvement is not that significant (or the benchmark platform may have too big variation).

VERSION QPS LATENCY (P99)
8.5.0-no-point-stats-index-usage 121897 1.93
8.5.0-with-index-usage 122203 2.08
8.5.0-disable-index-usage-report 1.91

Theoretically, this PR should never hurt performance. I'll try to do the benchmark manually to make sure there is nothing wrong 🤔 .

@YangKeao YangKeao force-pushed the not-load-stats-for-point-get branch 2 times, most recently from 1644084 to 5eaa2e6 Compare January 13, 2025 13:47
@YangKeao YangKeao force-pushed the not-load-stats-for-point-get branch from 5eaa2e6 to d3e7296 Compare January 14, 2025 02:29
@YangKeao
Copy link
Member Author

YangKeao commented Jan 16, 2025

A new benchmark result:

image

I'll do another benchmark, and see the profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't load stats in index usage reporter for point get requests to accelerate it
1 participant