Christian Johannsen
Christian Johannsen

Reputation: 27

When are dropped SSTables compacted with SizeTieredCompaction in Cassandra?

With SizeTieredCompaction you may have a max of 32 SSTables per bucket and the coldest (like 33) gets dropped.

When will they be picked up again?

Are the compacted considered in a new bigger bucket again?

Upvotes: 1

Views: 65

Answers (1)

Chris Lohfink
Chris Lohfink

Reputation: 16400

SSTables are not dropped (there is a tombstone threshold, but they just single sstable compaction to purge, not dropped). Buckets are to determine which sets of sstables should be merged. The 32 max is the maximum number it will put in a single compaction if there are that many similar sized sstables. Most compactions will be with the min_threshold number of sstables (4 default).

Size-tiered compaction merges sets of SSTables that are approximately the same size. Casssandra compares each SSTable size to the average of all SSTable sizes on the node. It merges SSTables whose sizes in KB are within [average-size × bucket_low] and [average-size × bucket_high].

Depending on data, its possible that the merged sstable would be anywhere from 0x to 4x (assuming 4 in compaction) the size of the originals.

Upvotes: 2

Related Questions