title: Cassandra constant tombstone compaction of table
body: <p>I have a couple of Cassandra tables on which tombstone compaction is constantly being run and I believe this is the reason behind high CPU usage by the Cassandra process.</p>
  
  <p>Settings I have include:</p>
  
  <pre><code>compaction = {'tombstone_threshold': '0.01', 
  'tombstone_compaction_interval': '1', 'class': 
  'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
  default_time_to_live = 1728000
  AND gc_grace_seconds = 864000
  AND max_index_interval = 2048
  AND memtable_flush_period_in_ms = 0
  AND min_index_interval = 128
  AND read_repair_chance = 0.0
  </code></pre>
  
  <p>In one of the tables I write data to it every minute. Because of the TTL that is set, a whole set of rows expire every minute too.</p>
  
  <ul>
  <li><p>Is the constant compaction due to the low <strong>tombstone_threshold</strong> and <strong>tombstone_compaction_interval</strong> ?</p></li>
  <li><p>Can someone give a detailed explanation of <strong>tombstone_threshold</strong> and <strong>tombstone_compaction_interval</strong>. The Cassandra document doesn't explain it too well.</p></li>
  </ul>