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

Introduce optional LSM Segment Size limit #4872

Merged
merged 5 commits into from
May 9, 2024

Conversation

etiennedi
Copy link
Member

@etiennedi etiennedi commented May 8, 2024

What's being changed:

  • By default, LSM segments have no size limit
  • During a compaction, the necessary disk space is roughly size(left_segment)+size(right_segment)
  • In billion-scale setups, this could easily lead to temporary disk usage spikes of 1TB or more
  • This PR adds an optional env var PERSISTENCE_LSM_MAX_SEGMENT_SIZE
    • It defaults to unlimited for backward compatibility
    • Possible values are
      • Any positive number, will be parsed into an int64 and interpreted as bytes
      • A resource string using IEC units, such as 4GiB
      • A resource string using SI units, such as 4GB

Some examples of the setting in action:

PERSISTENCE_LSM_MAX_SEGMENT_SIZE=2GiB

Screenshot 2024-05-08 at 11 03 50 AM

PERSISTENCE_LSM_MAX_SEGMENT_SIZE=8GiB

Screenshot 2024-05-08 at 11 08 46 AM

PERSISTENCE_LSM_MAX_SEGMENT_SIZE=unlimited or not set at all

Screenshot 2024-05-08 at 12 02 48 PM

Review checklist

  • Documentation has been updated, if necessary. Link to changed documentation:
  • Chaos pipeline run or not necessary. Link to pipeline:
  • All new code is covered by tests where it is reasonable.
  • Performance tests have been run or not necessary.

Still missing as of this commit:
- use in every bucket (currently only objects bucket)
- tests (so far only tested manually)
Copy link

sonarcloud bot commented May 8, 2024

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@antas-marcin antas-marcin merged commit 51021c2 into stable/v1.24 May 9, 2024
38 of 39 checks passed
@antas-marcin antas-marcin deleted the introduce-max-segment-size branch May 9, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants