-
Notifications
You must be signed in to change notification settings - Fork 726
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
scheduelrs: add load expectations for hot scheudler #2297
Conversation
Signed-off-by: nolouch <[email protected]>
Signed-off-by: nolouch <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2297 +/- ##
==========================================
+ Coverage 76.25% 76.56% +0.30%
==========================================
Files 199 201 +2
Lines 21591 21803 +212
==========================================
+ Hits 16464 16693 +229
+ Misses 3891 3883 -8
+ Partials 1236 1227 -9
Continue to review full report at Codecov.
|
@@ -42,6 +42,7 @@ func initHotRegionScheduleConfig() *hotRegionSchedulerConfig { | |||
GreatDecRatio: 0.95, | |||
MinorDecRatio: 0.99, | |||
MaxPeerNum: 1000, | |||
ToleranceRatio: 1.02, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 1.02?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2%
pkg/mock/mockcluster/mockcluster.go
Outdated
@@ -420,10 +426,13 @@ func (mc *Cluster) UpdateStorageReadBytes(storeID uint64, bytesRead uint64) { | |||
} | |||
|
|||
// UpdateStorageWrittenKeys updates store written keys. | |||
func (mc *Cluster) UpdateStorageWrittenKeys(storeID uint64, keysWritten uint64) { | |||
func (mc *Cluster) UpdateStorageWrittenKeys(storeID uint64, keysWritten uint64, updateSingleOption ...struct{}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
func (mc *Cluster) UpdateStorageWrittenKeys(storeID uint64, keysWritten uint64, updateSingleOption ...struct{}) { | |
func (mc *Cluster) UpdateStorageWrittenStats(storeID uint64, keysWritten uint64, bytesWritten uint64) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rest LGTM
// Only consider about count and key rate. | ||
if srcLd.Count > dstLd.Count && | ||
srcLd.KeyRate >= dstLd.KeyRate+peer.GetKeyRate() { | ||
// Only consider about key rate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is its effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The srcCount
may higher but the keyRate
lower.
Signed-off-by: nolouch <[email protected]>
/merge |
/run-all-tests |
@nolouch merge failed. |
/merge |
/run-all-tests |
@nolouch merge failed. |
/merge |
/run-all-tests |
@nolouch merge failed. |
/run-all-tests |
* scheduelrs: add load expectations for hot scheudler Signed-off-by: nolouch <[email protected]>
* scheduelrs: add load expectations for hot scheudler Signed-off-by: nolouch <[email protected]>
Signed-off-by: nolouch [email protected]
What problem does this PR solve?
To prevent excessive redundant scheduling
What is changed and how it works?
add the avg load as an expectation.
Release note
Check List
Tests
the scheduler operator is reduced and QPS is stable.