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

resource_manager: introduce the resource unit model and config #5862

Merged
merged 5 commits into from
Jan 16, 2023

Conversation

JmPotato
Copy link
Member

Signed-off-by: JmPotato ghzpotato@gmail.com

What problem does this PR solve?

Issue Number: ref #5851.

What is changed and how does it work?

Introduce the resource unit (RU) model and related config.

Check List

Tests

  • Unit test
  • Integration test

Related changes

Release note

None.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 13, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CabinfeverB
  • nolouch

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 release-note-none Denotes a PR that doesn't merit a release note. label Jan 13, 2023
@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Base: 75.62% // Head: 75.43% // Decreases project coverage by -0.19% ⚠️

Coverage data is based on head (7af80a8) compared to base (5573d67).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5862      +/-   ##
==========================================
- Coverage   75.62%   75.43%   -0.20%     
==========================================
  Files         337      337              
  Lines       34129    34129              
==========================================
- Hits        25810    25745      -65     
- Misses       6111     6158      +47     
- Partials     2208     2226      +18     
Flag Coverage Δ
unittests 75.43% <ø> (-0.20%) ⬇️

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

Impacted Files Coverage Δ
pkg/errs/errs.go 75.00% <0.00%> (-25.00%) ⬇️
pkg/id/id.go 83.05% <0.00%> (-10.17%) ⬇️
pkg/dashboard/adapter/manager.go 75.86% <0.00%> (-5.75%) ⬇️
server/region_syncer/server.go 81.86% <0.00%> (-5.50%) ⬇️
pkg/election/leadership.go 76.28% <0.00%> (-4.13%) ⬇️
pkg/member/member.go 62.10% <0.00%> (-3.69%) ⬇️
server/tso/allocator_manager.go 64.19% <0.00%> (-3.55%) ⬇️
pkg/storage/kv/etcd_kv.go 72.22% <0.00%> (-3.18%) ⬇️
pkg/utils/etcdutil/etcdutil.go 82.55% <0.00%> (-2.33%) ⬇️
server/schedule/labeler/rules.go 87.50% <0.00%> (-2.28%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@nolouch nolouch 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 added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 13, 2023
Signed-off-by: JmPotato <ghzpotato@gmail.com>
const (
defaultReadBaseCost = 1
defaultReadCostPerByte = 1. / 1024 / 1024
defaultWriteBaseCost = 5
Copy link
Contributor

Choose a reason for hiding this comment

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

is it too high?

Copy link
Member Author

Choose a reason for hiding this comment

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

Make sense. Let's keep it a smaller value first. We can adjust it after some tests.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
pkg/mcs/resource_manager/client/model.go Outdated Show resolved Hide resolved
pkg/mcs/resource_manager/client/model.go Outdated Show resolved Hide resolved
pkg/mcs/resource_manager/client/model.go Outdated Show resolved Hide resolved
pkg/mcs/resource_manager/client/model.go Outdated Show resolved Hide resolved
Signed-off-by: JmPotato <ghzpotato@gmail.com>
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 16, 2023
@JmPotato
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: e48b2fc

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 16, 2023
@ti-chi-bot
Copy link
Member

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

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.

@ti-chi-bot ti-chi-bot merged commit c6ebcec into tikv:master Jan 16, 2023
@JmPotato JmPotato deleted the ru_model branch January 16, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants