title: Cassandra not compacting sstables?
body: <p><code>nodetool cfstats</code> shows me the following output:</p>
  
  <pre><code>Read Count: 746287
  Read Latency: 8.772114064696291 ms.
  Write Count: 135629
  Write Latency: 0.052691931666531494 ms.
  Pending Flushes: 0
      Table: graphindex
      ** SSTable count: 230 **
      Space used (live): 1532001
      Space used (total): 1532001
      Space used by snapshots (total): 0
      SSTable Compression Ratio: 0.8071848230527264
      Memtable cell count: 159436
      Memtable data size: 2609278
      Memtable switch count: 1
      Local read count: 746287
      ** Local read latency: 8.773 ms **
      Local write count: 135629
      Local write latency: 0.053 ms
      Pending flushes: 0
      Bloom filter false positives: 1122
      Bloom filter false ratio: 0.00000
      Bloom filter space used: 39312
      Compacted partition minimum bytes: 43
      Compacted partition maximum bytes: 20501
      Compacted partition mean bytes: 70
      Average live cells per slice (last five minutes): 320.3775491198426
      Maximum live cells per slice (last five minutes): 3183.0
      ** Average tombstones per slice (last five minutes): 7997.852040836836 **
      ** Maximum tombstones per slice (last five minutes): 27078.0 **
  </code></pre>
  
  <p>As you can see the number of sstables is quite large. The table uses default compaction SizeTieredCompactionStrategy with min threshold 4 and max 32.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li><p>Why there are still so many sstables taking into account that the amount of data in the node is not large and the sstables are quite small? How (when) could this happen?</p></li>
  <li><p>When SizeTieredCompactionStrategy actually triggers the compaction? In <a href="https://stackoverflow.com/questions/27434397/cassandra-high-number-of-sstables">the other post</a> I found that:</p></li>
  </ol>
  
  <blockquote>
    <p>By default, a minor compaction can begin any time Cassandra creates
    four SSTables on disk for a column family. A minor compaction must
    begin before the total number of SSTables reaches 32.</p>
  </blockquote>
  
  <p>But what should I do if the number of sstables already exceeds 32? Is running major compaction manually the only solution?</p>
  
  <p>The reason why I'm asking is that because of big number of tombstones (last lines in the output above) and sstables, the read latency is becoming quite bad. The <code>gc_grace_period</code> is kept at low value, but since Cassandra didn't compact the sstables, the tombstones are still there. Or am I missing something?</p>