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

refine LAC computation of avg_speed #8277

Merged
merged 13 commits into from
Nov 2, 2023
Merged

Conversation

guo-shaoge
Copy link
Contributor

@guo-shaoge guo-shaoge commented Oct 31, 2023

What problem does this PR solve?

Issue Number: close #8287

Problem Summary:

  1. refine calculation of avg_speed:
    1. before: avg_speed may be negative because of worker consume too many RU, like:
      1. e56c27be-1399-4a78-9ff2-3faab7446918
    2. after: calculate avg_speed every 5 seconds. And ru_consumption_speed is the avg speed of last 5 seconds. ru_consumption_delta is the ru consumption of last 5 seconds, it will be set to zero after report consumption to GAC every 5 seconds.
      1. image

Others:

  1. Add needNotifyStopTrickleMode to exit trickle mode timely. Otherwise it's possiable LAC cannot talk to GAC because always got enough token(a.k.a. the fill rate of trickle mode is large enough)
  2. Change ACQUIRE_RU_AMPLIFICATION from 1.1 to 1.5. Although tidb also use 1.1, but IMO it's a little small.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

None

Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 31, 2023
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/needs-linked-issue labels Nov 1, 2023
@guo-shaoge guo-shaoge changed the title [WIP] refine LAC computation of avg_speed refine LAC computation of avg_speed Nov 1, 2023
@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 Nov 1, 2023
@guo-shaoge guo-shaoge requested a review from SeaRise November 1, 2023 05:59
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
@guo-shaoge guo-shaoge requested a review from SeaRise November 2, 2023 02:00
Signed-off-by: guo-shaoge <[email protected]>
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 2, 2023
@ti-chi-bot ti-chi-bot bot added the lgtm label Nov 2, 2023
Copy link
Contributor

ti-chi-bot bot commented Nov 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SeaRise, windtalker

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 2, 2023
Copy link
Contributor

ti-chi-bot bot commented Nov 2, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-02 02:27:40.9177843 +0000 UTC m=+3092858.504894430: ☑️ agreed by windtalker.
  • 2023-11-02 04:05:38.426004357 +0000 UTC m=+3098736.013114488: ☑️ agreed by SeaRise.

Copy link
Contributor

ti-chi-bot bot commented Nov 2, 2023

@guo-shaoge: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

trigger some heavy tests which will not run always when PR updated.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@guo-shaoge
Copy link
Contributor Author

/run-integration-test

@guo-shaoge
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 2, 2023
Signed-off-by: guo-shaoge <[email protected]>
@guo-shaoge
Copy link
Contributor Author

/run-all-tests

@guo-shaoge guo-shaoge removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 2, 2023
@ti-chi-bot ti-chi-bot bot merged commit 05ad89b into pingcap:master Nov 2, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8300.

ti-chi-bot bot pushed a commit that referenced this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tiflash metric of resource_group.avg_speed is negitave
4 participants