Rate limit compactions with a 25ms pause after each complete file.

This commit is contained in:
JoelKatz
2013-06-19 09:36:47 -07:00
parent b1aa893b59
commit 430d08958c

View File

@@ -813,6 +813,10 @@ Status DBImpl::FinishCompactionOutputFile(CompactionState* compact,
(unsigned long long) output_number,
(unsigned long long) current_entries,
(unsigned long long) current_bytes);
// rate-limit compaction file creation
// with a 25ms pause
env_->SleepForMicroseconds(25000);
}
}
return s;