title: Cassandra: how to reduce the number of tombstones in a table? (tombstone_compaction_interval, gc_grace_seconds and LevelledCompactionStrategy)
body: <p>I've a table where I insert data with a TTL of 1 minute and I have a warning in DSE OpsCenter about the high number of tombstones in that table. Which does make sense since in average 80 records per minute are inserted in this table. 
  So for example for a full day 80 * 60 * 24 = 115200 records inserted and TTL'ed in one day.</p>
  
  <p>My question is what should I do in order to decrease the number of tombstones in this table?</p>
  
  <p>I've been been looking into <em>tombstone_compaction_interval</em> and <em>gc_grace_seconds</em> and this is where it gets a bit confusing as I'm having problems to understand the exact impact of these properties on the tombstones (even after reading the documentation provided by DataStax - <a href="http://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html" rel="nofollow noreferrer">http://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html</a> and <a href="http://docs.datastax.com/en/cql/3.1/cql/cql_reference/tabProp.html" rel="nofollow noreferrer">http://docs.datastax.com/en/cql/3.1/cql/cql_reference/tabProp.html</a>).</p>
  
  <p>I've also been looking into LevelledCompactionStrategy (<a href="https://www.datastax.com/dev/blog/leveled-compaction-in-apache-cassandra" rel="nofollow noreferrer">https://www.datastax.com/dev/blog/leveled-compaction-in-apache-cassandra</a>) since it also does seem to impact the tombstones compaction although I don't fully understand why.</p>
  
  <p>So I'm hoping someone will be able to help me better understand how this all works, or even just let me know if I'm going in the right direction.</p>