Generally compaction runs automatically after gc grace but in prod environments what are the best practice for compaction , is it good to run manual compaction periodically or not
Bringing together the Apache Cassandra experts from the community and DataStax.
Want to learn? Have a question? Want to share your expertise? You are in the right place!
Not sure where to begin? Getting Started
Also for clarification, compactions don't just triggered after GC grace. Compactions get scheduled for various other reasons depending on the compaction strategy for each table.
For example when using
SizeTieredCompactionStrategy (STCS), compactions can be triggered when N similar-sized SSTables have been identified as candidates. Cheers!
@adampaul, you should not manually compact your tables. It is a standard operation that Cassandra manages on its own and does not require manual intervention except in extreme cases.
Our engineers have written about this topic in the past including Why running major compactions is not ideal. The compaction strategies defined on each table will determine when there are suitable SSTable candidates to compact. You should just let the compaction strategy do its job.
For more info, see How data is maintained in Cassandra. Cheers!
7 People are following this question.