-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
allocator: replace read amp with io thresh #97142
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2607,9 +2607,9 @@ func newStoreMetrics(histogramWindow time.Duration) *StoreMetrics { | |
// L0SublevelsMax. this is not exported to as metric. | ||
sm.l0SublevelsTracker.swag = slidingwindow.NewMaxSwag( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we get rid of this? It's only used for metrics, AFAICT, and is surfacing a value we're no longer using in production code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The gossiped value is taken from this. It isn't exposed to metrics. We can remove it in 23.2. |
||
timeutil.Now(), | ||
allocatorimpl.L0SublevelInterval, | ||
// 5 sliding windows, by the default interval (2 mins) will track the | ||
// maximum for up to 10 minutes. Selected experimentally. | ||
// Use 5 sliding windows, so the retention period is divided by 5 to | ||
// calculate the interval of the sliding window buckets. | ||
allocatorimpl.L0SublevelTrackerRetention/5, | ||
5, | ||
) | ||
} | ||
|
@@ -2693,17 +2693,16 @@ func (sm *StoreMetrics) updateEngineMetrics(m storage.Metrics) { | |
sm.DiskStalled.Update(m.DiskStallCount) | ||
sm.SharedStorageBytesRead.Update(m.SharedStorageReadBytes) | ||
sm.SharedStorageBytesWritten.Update(m.SharedStorageWriteBytes) | ||
|
||
sm.RdbL0Sublevels.Update(int64(m.Levels[0].Sublevels)) | ||
sm.RdbL0NumFiles.Update(m.Levels[0].NumFiles) | ||
sm.RdbL0BytesFlushed.Update(int64(m.Levels[0].BytesFlushed)) | ||
// Update the maximum number of L0 sub-levels seen. | ||
sm.l0SublevelsTracker.Lock() | ||
sm.l0SublevelsTracker.swag.Record(timeutil.Now(), float64(m.Levels[0].Sublevels)) | ||
curMax, _ := sm.l0SublevelsTracker.swag.Query(timeutil.Now()) | ||
sm.l0SublevelsTracker.Unlock() | ||
syncutil.StoreFloat64(&sm.l0SublevelsWindowedMax, curMax) | ||
|
||
sm.RdbL0Sublevels.Update(int64(m.Levels[0].Sublevels)) | ||
sm.RdbL0NumFiles.Update(m.Levels[0].NumFiles) | ||
sm.RdbL0BytesFlushed.Update(int64(m.Levels[0].BytesFlushed)) | ||
for level, stats := range m.Levels { | ||
sm.RdbBytesIngested[level].Update(int64(stats.BytesIngested)) | ||
sm.RdbLevelSize[level].Update(stats.Size) | ||
|
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.
[nit] Capitalize IO. Consider the comments below about the vague "store health" naming. You could abolish the passive voice in this comment as well, it generally makes things sound more academic/complicated and less accessible. For example: "This threshold is not considered ... when enforcementLevel is set to ..." -> "When enforcementLevel == storeHealth{NoAction,LogOnly}, we ignore this threshold" or "By default storeHealthBlockRebalanceTo is the action taken" could be omitted altogether here, since the default enforcement level is not set in code in this file/method.