Skip to content
Browse files

perf top indicates the pthread timed wait was heavy hitter. reduced n…

…umber of times a compaction thread call PrioritizeWork() to reduce unnecessary overhead. compactions are running too slow in 2i_slf_stressmix
  • Loading branch information...
1 parent 0eaa716 commit 25000dec68e14599517cdbaf1294f734b6cbde7c @matthewvon matthewvon committed Jun 25, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 db/db_impl.cc
View
6 db/db_impl.cc
@@ -1126,8 +1126,10 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
for (; input->Valid() && !shutting_down_.Acquire_Load(); )
{
- // Prioritize immutable compaction work
- imm_micros+=PrioritizeWork(is_level0_compaction);
+ // Prioritize compaction work ... every 100 keys
+ if (NULL==compact->builder
+ || 0==(compact->builder->NumEntries() % 100))
+ imm_micros+=PrioritizeWork(is_level0_compaction);
Slice key = input->key();
if (compact->builder != NULL

0 comments on commit 25000de

Please sign in to comment.
Something went wrong with that request. Please try again.