-
Notifications
You must be signed in to change notification settings - Fork 522
Open
Description
We currently use the code below to calculate a smoothed level multiplier:
bottomLevelSize := dbSize - dbSize/uint64(p.opts.Experimental.LevelMultiplier)
...
smoothedLevelMultiplier := 1.0
if p.baseLevel < numLevels-1 {
smoothedLevelMultiplier = math.Pow(
float64(bottomLevelSize)/float64(baseBytesMax),
1.0/float64(numLevels-p.baseLevel-1))
}
levelSize := float64(baseBytesMax)
for level := p.baseLevel; level < numLevels; level++ {
if level > p.baseLevel && levelSize > 0 {
levelSize *= smoothedLevelMultiplier
}
...
}At the CRDB settings (baseBytesMax=64MiB, LevelMultiplier=10), once the LSM size goes over 7TiB, the smothedLevelMultiplier goes above 10. At the current advisory limit of 10TiB, it is 10.8. At a hypothetical 40TiB, it is 14.3.
Instead of letting the multiplier go above the LevelMultiplier, we should increase the target for L1.
It could be something like this:
if smoothedLevelMultiplier > float64(p.opts.Experimental.LevelMultiplier) {
levelSize = float64(curLevelSize)
smoothedLevelMultiplier = float64(p.opts.Experimental.LevelMultiplier)
}
Jira issue: PEBBLE-1296