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

Compaction: Restore SetupForCompaction functionality #788

Merged
merged 4 commits into from
Dec 31, 2023

Conversation

Yuval-Ariel
Copy link
Contributor

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 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
Copy link
Contributor

@ofriedma ofriedma left a comment

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
17 checks passed
@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