LCS: Fix terrible write amplification when reshaping level 0
LCS: Fix terrible write amplification when reshaping level 0

LCS reshape is basically 'major compacting' level 0 until it contains less than
N sstables.

That produces terrible write amplification, because any given byte will be
compacted (initial # of sstables / max_threshold (32)) times. So if L0 initially
contained 256 ssts, there would be a WA of about 8.

This terrible write amplification can be reduced by performing STCS instead on
L0, which will leave L0 in a good shape without hurting WA as it happens
now.

Fixes #8345.

Signed-off-by: Raphael S. Carvalho <1e2942cea40e3b4d2162dfcd9e53e41c05a84d22@scylladb.com>
Message-Id: <20210322150655.27011-1-1e2942cea40e3b4d2162dfcd9e53e41c05a84d22@scylladb.com>

scylladb/scylla,scylladb/scylla,scylladb/scylla,scylladb/scylla