Size-tiered compaction strategy (STCS) groups SSTables into buckets according to size. When a bucket reaches its configured capacity, Scylla compacts all its SSTables into one larger SSTable, which may fill a higher tier and trigger another compaction. section 8.4.1
STCS has practical consequences for table operations:
- It is Scylla’s default strategy and generally produces fewer SSTables, though those files are larger. section 8.4.1
- Obsolete row versions can remain distributed across SSTables until a tier fills, so cleanup may be delayed. section 8.4.1
- Compaction can require substantial temporary disk space; in the worst case, about half the disk may need to remain free. section 8.4.1
- STCS differs from leveled compaction strategy and time-window compaction strategy, which organize SSTables by levels or time windows. section 8.5
Configuring STCS
A table can explicitly select the strategy with CQL: CREATE TABLE ... WITH compaction = {'class': 'SizeTieredCompactionStrategy'} ...
