Skip to content

Commit 5bbb544

Browse files
committed
Rate limit compactions with a 25ms pause after each complete file.
1 parent 8c29c47 commit 5bbb544

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

db/db_impl.cc

+4
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,10 @@ Status DBImpl::FinishCompactionOutputFile(CompactionState* compact,
813813
(unsigned long long) output_number,
814814
(unsigned long long) current_entries,
815815
(unsigned long long) current_bytes);
816+
817+
// rate-limit compaction file creation
818+
// with a 25ms pause
819+
env_->SleepForMicroseconds(25000);
816820
}
817821
}
818822
return s;

0 commit comments

Comments
 (0)