-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-13114. Make MaxSubCompactions configureable for manual compaction #8572
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
HDDS-13114. Make MaxSubCompactions configureable for manual compaction #8572
Conversation
swamirishi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterxcli Thanks for working on the patch. I have left some comments inline.
| } | ||
|
|
||
| return new RDBStore(dbFile, rocksDBOption, statistics, writeOptions, tableConfigs, | ||
| ManagedCompactRangeOptions rangeCompactionOptions = new ManagedCompactRangeOptions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be done on the automatic background compactions. We need these compaction options only for the manual compactions done by the BackgroundCompactionService & SnapshotCache. These default options on the rocksdb options should be coming from an ini file we don't want individual ozone configuration corresponding to each and every rocksdb configuration this might get very tough to handle later.
https://issues.apache.org/jira/browse/HDDS-12484
cc: @Galsza
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 140 in b91e8e7
| try (ManagedCompactRangeOptions options = new ManagedCompactRangeOptions()) { |
ozone/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStore.java
Line 227 in 006e691
| try (ManagedCompactRangeOptions options = new ManagedCompactRangeOptions()) { |
…pactionbytes-and-maxsubcompactions-configurable
91bc8b3 to
6385e7e
Compare
| defaultValue = "1", | ||
| tags = {OM}, | ||
| description = "Maximum number of sub compactions to use when manual compacting. Default 1 means no limit.") | ||
| private int manualCompactionMaxSubCompactions = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/facebook/rocksdb/wiki/Subcompaction#options
The option max_subcompactions limits the max number of subcompactions for each compaction. By default, max_subcompactions = 1, which means it is disabled.
|
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days. |
|
Thank you for your contribution. This PR is being closed due to inactivity. If needed, feel free to reopen it. |
What changes were proposed in this pull request?
#8141 (comment)
In #8141
RDBStore#compactTablewas introduced.We should set
options.setMaxCompactionBytes()when we open the snapshot rocksdb this could be useful so that we ensure one sub compaction doesn't take up a lot of memory. Also look into making ManagedCompactRangeOptions.setMaxSubCompactions() configurable so that we don't use a lot of CPU for this operation. It is ok if the compactions take time.This can be achieved by adding
ManagedRangeCompactionOptionintoAbstractRDBStore,RDBStore,RDBStoreBuilder. Also the corresponding rocksdb config keys.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13114
How was this patch tested?
CI:
https://github.com/peterxcli/ozone/actions/runs/15484301525