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

store/copr: remove useless ticker for performance #57558

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

crazycs520
Copy link
Contributor

@crazycs520 crazycs520 commented Nov 20, 2024

What problem does this PR solve?

Issue Number: ref #57580

Problem Summary: remove useless ticker for performance

What changed and how does it work?

This pr removes this useless ticker. In current implementation, if the SQL is been killed, then ctx.Done will work, so no need the ticker.

And remove it is for performance, following is the sysbench oltp_index_scan test, and the range size is 2:

sysbench --config-file=sysbench.conf oltp_index_scan --tables=16 --table-size=1000000 --threads=128 --range-size=2 run

The example query is like this:

SELECT
  k
FROM
  sbtest1
WHERE
  k BETWEEN ?
  AND ? [arguments: (503925, 503926)]

Which Plan is:


| id                 | estRows | estCost | actRows | task      | access object               | execution info                                                                                                                                                                                                                                                                                         | operator info                           | memory    | disk  |
| IndexReader_6      | 2.07    | 31.20   | 2       | root      |                             | time:1.31ms, loops:2, cop_task: {num: 1, max: 1.15ms, proc_keys: 2, tot_proc: 81.2µs, tot_wait: 575.8µs, copr_cache: disabled, build_task_duration: 12.2µs, max_distsql_concurrency: 1}, rpc_info:{Cop:{num_rpc:1, total_time:1.12ms}}                                                                 | index:IndexRangeScan_5                  | 278 Bytes | N/A   |
| └─IndexRangeScan_5 | 2.07    | 336.86  | 2       | cop[tikv] | table:sbtest1, index:k_1(k) | tikv_task:{time:0s, loops:1}, scan_detail: {total_process_keys: 2, total_process_keys_size: 92, total_keys: 3, get_snapshot_time: 539.6µs, rocksdb: {key_skipped_count: 2, block: {cache_hit_count: 6}}}, time_detail: {total_process_time: 81.2µs, total_wait_time: 575.8µs, tikv_wall_time: 751.3µs} | range:[503925,503926], keep order:false | N/A       | N/A   |
Version workload sub-cmd Thread QPS AVG Duration QPS Increase
Master Sysbench oltp_index_scan 128 80285 1.59 0%
This PR Sysbench oltp_index_scan 128 82009 1.56 2.1%

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 <crazycs520@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 20, 2024
Copy link

tiprow bot commented Nov 20, 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.

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.4613%. Comparing base (2ff351d) to head (d5faf48).
Report is 12 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #57558        +/-   ##
================================================
+ Coverage   72.8166%   73.4613%   +0.6447%     
================================================
  Files          1676       1676                
  Lines        463603     463630        +27     
================================================
+ Hits         337580     340589      +3009     
+ Misses       105179     102293      -2886     
+ Partials      20844      20748        -96     
Flag Coverage Δ
integration 43.4779% <ø> (?)
unit 72.2713% <ø> (+0.0636%) ⬆️

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

Components Coverage Δ
dumpling 52.7673% <ø> (ø)
parser ∅ <ø> (∅)
br 45.4049% <ø> (+0.0060%) ⬆️
---- 🚨 Try these New Features:

@crazycs520
Copy link
Contributor Author

/retest-required

Copy link

tiprow bot commented Nov 20, 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 approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 21, 2024
Copy link

ti-chi-bot bot commented Nov 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiancaiamao, 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 21, 2024
Copy link

ti-chi-bot bot commented Nov 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-21 08:07:41.810853871 +0000 UTC m=+105449.430508384: ☑️ agreed by tiancaiamao.
  • 2024-11-21 09:08:49.337041934 +0000 UTC m=+109116.956696446: ☑️ agreed by zyguan.

@ti-chi-bot ti-chi-bot bot merged commit f347b9d into pingcap:master Nov 21, 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants