mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 19:35:12 +00:00
SSTables are added in increasing size order so the bucket's
average might drift upwards.
Don't let it drift too high, to a point where the smallest
SSTable might fall out of range.
For example, here's a simulation run of the algorithm for these sstable sizes:
[21, 123, 252, 363, 379, 394, 407, 428, 463, 467, 470, 523, 752, 774]
the simulated compaction strategy options are:
min_sstable_size = 4
bucket_low = 0.66667
bucket_high = 1.5
For each bucket, the following is printed: (avg * bucket_low) avg (avg * bucket_high)
UNCHANGED:
buckets={
( 14.0) 21.0 ( 31.5): [21]
( 82.0) 123.0 ( 184.5): [123]
( 276.4) 414.6 ( 621.9): [252, 363, 379, 394, 407, 428, 463, 467, 470, 523]
( 508.7) 763.0 (1144.5): [752, 774]
}
IMPROVED:
buckets={
( 14.0) 21.0 ( 31.5): [21]
( 82.0) 123.0 ( 184.5): [123]
( 247.0) 370.5 ( 555.8): [252, 363, 379, 394, 407, 428]
( 320.5) 480.8 ( 721.1): [463, 467, 470, 523]
( 508.7) 763.0 (1144.5): [752, 774]
}
Fixes #8584
Signed-off-by: Benny Halevy <bhalevy@scylladb.com>