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

*: Optimize collecting executor runtime stats performance #58420

Merged
merged 34 commits into from
Dec 27, 2024

Conversation

crazycs520
Copy link
Contributor

@crazycs520 crazycs520 commented Dec 19, 2024

What problem does this PR solve?

Issue Number: ref #56649

Problem Summary: Optimize collecting executor runtime stats performance.

Related PR: tikv/client-go#1532

What changed and how does it work?

  • Remove some useless field in struct.
  • Avoid memory allocate in heap.
  • Adjust the API to reduce consumption.

Before

image image

This PR

image image

Benchmark

version workload thread QPS QPS Increase
master oltp_point_select 100 87060  
This PR oltp_point_select 100 87869 0.9%
master oltp_index_scan(range-size=2) 100 45424  
This PR oltp_index_scan(range-size=2) 100 46286 1.9%
master oltp_index_lookup(range-size=2) 100 18068  
This PR oltp_index_lookup(range-size=2) 100 18605 2.9%

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.

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

Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 19, 2024
Copy link

tiprow bot commented Dec 19, 2024

Hi @crazycs520. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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.

Signed-off-by: crazycs520 <[email protected]>
@crazycs520 crazycs520 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2024
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
Signed-off-by: crazycs520 <[email protected]>
@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 Dec 23, 2024
@pingcap pingcap deleted a comment from ti-chi-bot bot Dec 25, 2024
Signed-off-by: crazycs520 <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 25, 2024
@crazycs520
Copy link
Contributor Author

/retest-required

Copy link

tiprow bot commented Dec 25, 2024

@crazycs520: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest-required

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.

Copy link

codecov bot commented Dec 25, 2024

Codecov Report

Attention: Patch coverage is 81.55340% with 38 lines in your changes missing coverage. Please review.

Project coverage is 74.1073%. Comparing base (1fef963) to head (5d5a593).
Report is 20 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58420        +/-   ##
================================================
+ Coverage   73.5155%   74.1073%   +0.5918%     
================================================
  Files          1681       1681                
  Lines        464415     469963      +5548     
================================================
+ Hits         341417     348277      +6860     
+ Misses       102152     101030      -1122     
+ Partials      20846      20656       -190     
Flag Coverage Δ
integration 44.0958% <58.2524%> (?)
unit 72.8807% <80.0970%> (+0.5983%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.8134% <ø> (+0.0388%) ⬆️

@crazycs520
Copy link
Contributor Author

/retest-required

Copy link

tiprow bot commented Dec 25, 2024

@crazycs520: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest-required

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.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 26, 2024
@crazycs520 crazycs520 requested a review from cfzjywxk December 27, 2024 04:25
Copy link

ti-chi-bot bot commented Dec 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, zyguan

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

@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 27, 2024
Copy link

ti-chi-bot bot commented Dec 27, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-26 09:53:38.503070077 +0000 UTC m=+1728208.591872620: ☑️ agreed by zyguan.
  • 2024-12-27 05:49:20.305957935 +0000 UTC m=+70295.661962473: ☑️ agreed by cfzjywxk.

@hawkingrei
Copy link
Member

/retest

@ti-chi-bot ti-chi-bot bot merged commit a82a3b4 into pingcap:master Dec 27, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants