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

schedule: tune waiting region length #3748

Closed
wants to merge 1 commit into from

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Jun 7, 2021

Signed-off-by: disksing [email protected]

What problem does this PR solve?

The regions in the waring list are checked every tick. When there are many regions need to fix, it costs too much CPU.

Part of #3744

What is changed and how it works?

Update cache size to a smaller value.

Check List

Tests

  • Unit test

Release note

None

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 7, 2021
@ti-chi-bot ti-chi-bot requested review from lhy1024 and rleungx June 7, 2021 06:45
@rleungx
Copy link
Member

rleungx commented Jun 7, 2021

IMO, if the cache size is small, it will be less useful when there are a lot of regions.

@disksing
Copy link
Contributor Author

disksing commented Jun 8, 2021

IMO, if the cache size is small, it will be less useful when there are a lot of regions.

The problem is that for every tick we only scan 128 regions. This means that when the 1000 length cache is filled, we will spend 90% of our CPU time repeatedly checking the region in the cache and only 10% of our CPU time on the scan. This doesn't seem quite suitable anymore.

@disksing disksing added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 12, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 15, 2021
@disksing disksing closed this Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants