Skip to content

Compaction: Restore SetupForCompaction functionality#788

Merged
Yuval-Ariel merged 4 commits into
mainfrom
restore-normal-hint-for-compaction-files
Dec 31, 2023
Merged

Compaction: Restore SetupForCompaction functionality#788
Yuval-Ariel merged 4 commits into
mainfrom
restore-normal-hint-for-compaction-files

Conversation

@Yuval-Ariel

Copy link
Copy Markdown
Collaborator

In facebook/rocksdb#11658, files are no longer controlled by the access_hint_on_compaction_start flag by removing the content of SetupForCompaction. However, this leads to degradation in compaction read speed when combined with compaction_readahead_size since once a file is opened, in linux, it is hinted with POSIX_FADV_RANDOM.

See #787 for full details.

Add back the default hint to avoid degradation in this scenario.

In facebook/rocksdb#11658, files are no longer controlled by the access_hint_on_compaction_start flag by removing the content of SetupForCompaction.
However, this leads to degradation in compaction read speed when combined with compaction_readahead_size since once a file is opened, in linux, it is hinted with POSIX_FADV_RANDOM.

See #787 for full details.

Add back the default hint to avoid degradation in this scenario.
@Yuval-Ariel Yuval-Ariel added the bug fix Fixes a known bug label Dec 25, 2023
@Yuval-Ariel Yuval-Ariel requested a review from ofriedma December 25, 2023 09:56
@Yuval-Ariel Yuval-Ariel self-assigned this Dec 25, 2023
@Yuval-Ariel Yuval-Ariel linked an issue Dec 25, 2023 that may be closed by this pull request
ofriedma
ofriedma previously approved these changes Dec 25, 2023

@ofriedma ofriedma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Yuval-Ariel Yuval-Ariel merged commit 830754f into main Dec 31, 2023
@Yuval-Ariel Yuval-Ariel deleted the restore-normal-hint-for-compaction-files branch December 31, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Fixes a known bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecation of SetupForCompaction causes slow compactions

2 participants