Default value for max_compaction_bytes should be scaled with max_bytes_for_level_multiplier
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
This is a feature request.
The default for max_compaction_bytes is 0 and when 0 is set to 25 * target_file_size_base at startup. This limits a leveled compaction job to <= 25 SSTs. But if someone were to increase max_bytes_for_level_multiplier from the default of 10 to 20 or 50 then it is expected that an SST on level N will overlap with more SSTs on level N+1 and max_compaction_bytes should be scaled to match that.
If a user increases the per-level fanout but does not realize they need to manually set max_compaction_bytes (because the default behavior was working prior to the increase) then they might be confused by the outcome and performance will be worse than expected.
The feature request is to consider the value of max_bytes_for_level_multiplier when computing a value for max_compaction_bytes at startup.
Contributor guide
Assessment
This issue has not been assessed yet.