Skip to content

fix tiflash resource control low token signal miss (#10140)#10195

Merged
ti-chi-bot[bot] merged 4 commits intopingcap:release-7.5from
ti-chi-bot:cherry-pick-10140-to-release-7.5
May 22, 2025
Merged

fix tiflash resource control low token signal miss (#10140)#10195
ti-chi-bot[bot] merged 4 commits intopingcap:release-7.5from
ti-chi-bot:cherry-pick-10140-to-release-7.5

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #10140

What problem does this PR solve?

Issue Number: close #10137

Problem Summary:
before

  1. low token notify doesn't work becuase wait_for ignore low token signal
  2. 5s for computing avg speed is too long, which may not reflect the latest ru speed.
  3. acquire token from GAC every 5s

after:

  1. mainLoop thread will compute ru speed every 1s
  2. requestGACLoop thread is dedicated to sending gac thread
  3. only acquire token from GAC when got low token signal
  4. change min_wait_dura_ms from 100ms to 10ms.

What is changed and how it works?


Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  1. create tidb cluster with 2 tiflash(16c)
  2. load tpch50g workload
  3. run the following scripts: https://github.com/guo-shaoge/tiflash_resource_control_test_tool, detailed test report is internal
    1. high.change.sh

      image

    2. periodically.change.sh

      image

    3. priority.change.sh
      image

    4. burstable.change.sh
      image

  • 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

fix tiflash resource control low token signal miss

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR. labels May 21, 2025
@ti-chi-bot
Copy link
Member Author

@guo-shaoge This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
SCOPE_EXIT({
if (!is_disagg_storage)
LocalAdmissionController::global_instance.reset();
LocalAdmissionController::global_instance->safeStop();
Copy link
Contributor

Choose a reason for hiding this comment

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

to fix #10184

@guo-shaoge
Copy link
Contributor

/test pull-integration-test

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels May 21, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guo-shaoge, JaySon-Huang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [JaySon-Huang,guo-shaoge]

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 May 21, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 21, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-05-21 11:27:05.762598077 +0000 UTC m=+5330.179657640: ☑️ agreed by guo-shaoge.
  • 2025-05-21 11:58:15.533865515 +0000 UTC m=+7199.950925063: ☑️ agreed by JaySon-Huang.

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels May 21, 2025
@guo-shaoge
Copy link
Contributor

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 22, 2025
@ti-chi-bot ti-chi-bot bot merged commit 8718153 into pingcap:release-7.5 May 22, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants