- L0 -> Lo where o > 0
- Why: L0->Lo cannot be run in parallel with another L0->Lo, hence partitioning is the only way to speed it up.
- Manual Leveled Compaction: Li -> Lo where o > 0
- Why: Manual compaction invoked by the user is usually not parallelized hence benefits from partitioning.
- Select boundaries based on the natural boundary of input levels/files.
- first and last key of L0 files
- first key of each SST file of the last level
- Use Versions::ApproximateSize to estimate the data size in each boundary.
- Merge boundaries to eliminate empty and smaller-than-average ranges.
- find the average size in each range