mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
If ReadCompaction is switched off, then it is better to not even submit background compaction jobs.
Summary: If ReadCompaction is switched off, then it is better to not even submit background compaction jobs. I see about 3% increase in read-throughput on a pure memory database. Test Plan: run db_bench Reviewers: heyongqiang Reviewed By: heyongqiang Differential Revision: https://reviews.facebook.net/D5673
This commit is contained in:
@@ -1196,7 +1196,8 @@ Status DBImpl::Get(const ReadOptions& options,
|
||||
mutex_.Lock();
|
||||
}
|
||||
|
||||
if (have_stat_update && current->UpdateStats(stats)) {
|
||||
if (!options_.disable_seek_compaction &&
|
||||
have_stat_update && current->UpdateStats(stats)) {
|
||||
MaybeScheduleCompaction();
|
||||
}
|
||||
mem->Unref();
|
||||
|
||||
@@ -1392,7 +1392,7 @@ Compaction* VersionSet::PickCompaction() {
|
||||
// Wrap-around to the beginning of the key space
|
||||
c->inputs_[0].push_back(current_->files_[level][0]);
|
||||
}
|
||||
} else if (seek_compaction && !options_->disable_seek_compaction) {
|
||||
} else if (seek_compaction) {
|
||||
level = current_->file_to_compact_level_;
|
||||
c = new Compaction(level, MaxFileSizeForLevel(level),
|
||||
MaxGrandParentOverlapBytes(level), NumberLevels());
|
||||
|
||||
Reference in New Issue
Block a user