Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value for max_compaction_bytes should be scaled with max_bytes_for_level_multiplier #9544

Open
mdcallag opened this issue Feb 10, 2022 · 2 comments

Comments

@mdcallag
Copy link
Contributor

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.

@mdcallag
Copy link
Contributor Author

This blog post has links to the relevant code.

@zaidoon1
Copy link
Contributor

zaidoon1 commented Nov 17, 2023

I'm interested in this, is there a formula/good estimate for how max_compaction_bytes should scale? So say I increase the multiplier to 30 from 10 (3x), should i set max_compaction_bytes to 75 * target_file_size_base (3x)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants