-
Notifications
You must be signed in to change notification settings - Fork 727
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
scheduler: new hotspot scheduler basic part #1870
Conversation
/rebuild |
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.
reset LGTM.
/rebuild |
PTAL @rleungx |
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.
server/schedulers/hot_region.go
Outdated
// the flow of the region exceeds the threshold, the scheduler will update the region in | ||
// the hot cache and the hotdegree of the region will increase. | ||
for storeID, items := range storeHotPeers { | ||
storeHots, ok := stats[storeID] |
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.
storeHots
sounds not good enough?
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 about hotRegions
? Or hotPeers
?
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.
Both are better than storeHots
and I prefer to unify the naming of HotPeerStat
and storeHotRegionsDefaultLen
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.
Unified similar names.
Codecov Report
@@ Coverage Diff @@
## master #1870 +/- ##
==========================================
- Coverage 78.03% 77.85% -0.18%
==========================================
Files 161 161
Lines 16054 16126 +72
==========================================
+ Hits 12527 12555 +28
- Misses 2542 2573 +31
- Partials 985 998 +13
Continue to review full report at Codecov.
|
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.
LGTM.
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
//| 4 | 6MB | | ||
//| 5 | 0MB | | ||
//| 6 | 0MB | | ||
tc.UpdateStorageWrittenBytes(1, 7.5*MB*statistics.StoreHeartBeatReportInterval) |
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.
statistics.StoreHeartBeatReportInterval
is too long.
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.
I noticed that, but I didn't find any better way to solve it.
Co-Authored-By: lhy1024 <[email protected]>
/run-all-tests |
@Luffbee merge failed. |
/merge |
/run-all-tests |
What problem does this PR solve?
Currently, the hotspot scheduler use the number of hot regions to make schedule decision, which cannot cover "many warm region" case, and may make wrong schedule decisions.
What is changed and how it works?
Use store flow byte rate to make decision.
Check List
Tests
Related changes