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 c8456ce76d
commit 98455528ad

View File

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