-
Notifications
You must be signed in to change notification settings - Fork 593
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
storage
: book keep dirty_ratio
in disk_log_impl
#24649
Open
WillemKauf
wants to merge
5
commits into
redpanda-data:dev
Choose a base branch
from
WillemKauf:dirty_ratio_compaction
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+393
−14
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WillemKauf
force-pushed
the
dirty_ratio_compaction
branch
from
December 23, 2024 21:37
c2a0252
to
018f7a2
Compare
WillemKauf
commented
Dec 23, 2024
CI test resultstest results on build#60092
test results on build#60241
|
Adds the book-keeping variables `_dirty/closed_segment_bytes` to `disk_log_impl`, as well as some getter/setter functions. These functions will be used throughout `disk_log_impl` where required (segment rolling, compaction, segment eviction) to track the bytes contained in dirty and closed segments.
Uses the added functions `update_dirty/closed_segment_bytes()` in the required locations within `disk_log_impl` in order to bookkeep the dirty ratio. Bytes can be either removed or added by rolling new segments, compaction, and retention enforcement.
WillemKauf
force-pushed
the
dirty_ratio_compaction
branch
from
January 2, 2025 23:05
018f7a2
to
7bd15b2
Compare
Retry command for Build#60241please wait until all jobs are finished before running the slash command
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dirty ratio of a log is defined as the ratio between the number of bytes in "dirty" segments and the total number of bytes in closed segments.
Dirty segments are closed segments which have not yet been cleanly compacted- i.e, duplicates for keys in this segment could be found in the prefix of the log up to this segment.
Add book-keeping to
disk_log_impl
in order to cache both_dirty_segment_bytes
as well as_closed_segment_bytes
, which allows us to calculate the dirty ratio, and add observability for it instorage::probe
.In the future, this could be used in combination with a compaction configuration a la min.cleanable.dirty.ratio to schedule compaction.
Backports Required
Release Notes
Improvements
dirty_segment_bytes
andclosed_segment_bytes
to the storage layer.