tidb icon indicating copy to clipboard operation
tidb copied to clipboard

disttask: enlarge max-concurrent-task and optimize scheduler/executor loop

Open D3Hunter opened this issue 1 year ago • 8 comments

What problem does this PR solve?

Issue Number: ref #49008

Problem Summary:

What changed and how does it work?

  • change WaitTask/refreshTask(both scheduler and executor)/GetTaskExecInfoByExecID to query task base only to reduce overhead
  • change MaxConcurrentTask = 16

Check List

Tests

  • [x] Unit test
  • [ ] Integration test
  • [x] Manual test (add detailed scripts or steps below)

before this pr, if we run BenchmarkSchedulerOverhead with task-meta size = 4m and max-concurrent-task 4/8/16/32, cpu/mem is: image after(The initial/middle/tail spike is caused by create-task and switch-2-next-step.): image

  • [ ] 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

D3Hunter avatar Feb 22 '24 07:02 D3Hunter

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

ti-chi-bot[bot] avatar Feb 22 '24 07:02 ti-chi-bot[bot]

Hi @D3Hunter. 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/test-infra repository.

tiprow[bot] avatar Feb 22 '24 07:02 tiprow[bot]

Codecov Report

Merging #51241 (38a7498) into master (a84d57c) will decrease coverage by 15.6332%. Report is 19 commits behind head on master. The diff coverage is 68.6440%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #51241         +/-   ##
=================================================
- Coverage   70.6538%   55.0207%   -15.6332%     
=================================================
  Files          1457       1569        +112     
  Lines        433839     608182     +174343     
=================================================
+ Hits         306524     334626      +28102     
- Misses       108056     250668     +142612     
- Partials      19259      22888       +3629     
Flag Coverage Δ
integration 37.2094% <44.0678%> (?)
unit 70.8251% <67.8571%> (+0.3917%) :arrow_up:

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.3844% <ø> (+5.5397%) :arrow_up:

codecov[bot] avatar Feb 23 '24 09:02 codecov[bot]

/retest

D3Hunter avatar Feb 23 '24 10:02 D3Hunter

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

In response to this:

/retest

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/test-infra repository.

tiprow[bot] avatar Feb 23 '24 10:02 tiprow[bot]

/retest

D3Hunter avatar Feb 23 '24 12:02 D3Hunter

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

In response to this:

/retest

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/test-infra repository.

tiprow[bot] avatar Feb 23 '24 12:02 tiprow[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: okJiang, ywqzzy

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[bot] avatar Feb 27 '24 02:02 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2024-02-26 10:09:41.483831146 +0000 UTC m=+870270.231454271: :ballot_box_with_check: agreed by okJiang.
  • 2024-02-27 02:09:12.254645304 +0000 UTC m=+927841.002268415: :ballot_box_with_check: agreed by ywqzzy.

ti-chi-bot[bot] avatar Feb 27 '24 02:02 ti-chi-bot[bot]

/retest

D3Hunter avatar Feb 27 '24 02:02 D3Hunter

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

In response to this:

/retest

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/test-infra repository.

tiprow[bot] avatar Feb 27 '24 02:02 tiprow[bot]

/retest

D3Hunter avatar Feb 27 '24 02:02 D3Hunter

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

In response to this:

/retest

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/test-infra repository.

tiprow[bot] avatar Feb 27 '24 02:02 tiprow[bot]

/retest

D3Hunter avatar Feb 27 '24 03:02 D3Hunter

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

In response to this:

/retest

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/test-infra repository.

tiprow[bot] avatar Feb 27 '24 03:02 tiprow[bot]