Reputation: 655
I am relatively new to Cassandra, so I apologize in advance if I am missing something obvious. So, I am using cassandra 1.0.12 in a one node cluster and doing heavy writes and deletes (about 1000/sec). Writes are more frequent then deletes as a result my disk space goes on increasing. If I understand correctly the compaction would help me achieve that (Major and Minor). So I changed setGc_grace_seconds to 0 and setMin_compaction_threshold to 2. Even after setting these values I am seeing SSTable count 4 for that Column Family, shouldn't it kick compaction when the SSTable count is 2 ? Also, when does major compaction kick in and how can I control it (I want to run it more often).
Upvotes: 1
Views: 2984
Reputation: 1480
If you use Size-tiered compaction, minor compaction is triggered automatically sometimes after at least min_compaction_threshold SSTables of similiar size has been created on disk. So in your case, sometimes after two similiar sized SSTables have been created, minor compaction will kick in and merge those two SSTables to a new SSTable. Tuning options for Size-tiered compaction
Major compaction is manually triggered through nodetool. "For each column family in keyspace, this compacts all existing SSTables into a single SSTable".
Upvotes: 7