You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
db: don't smoothe compaction picker compensated fill factor
When deciding whether a level is even eligible for compaction picking, we
consider the 'compensated fill factor': a statistic about the size of a level
plus its garbage relative to the level's ideal size given the level multiplier
and database size. Currently, we consider a level eligible to be the input
level of a compaction if the compensated fill factor is > 1.0 AND the
compensated fill factor divided by the next level's fill factor is also > 1.0.
We've preserved this behavior for historical consistency but have no clear
justification for it. Experimentally, we've observed instances where the LSM is
known to contain significant garbage (>14%) but no compactions are pursued
because most of the data is in L6 and L6's fill factor is positive (see
cockroachdb/cockroach#151633).
This commit removes the separate concept of a 'compensated score,' instead
allowing the compaction picker to pursue a compaction out of a level so long as
its compensated fill factor is > 1.0.
0 commit comments