We did a bulk load and saw that the SSTABLE count went up to 8 for a table. Will it come down over a period of time if compaction runs incrementally in the background.
We did a bulk load and saw that the SSTABLE count went up to 8 for a table. Will it come down over a period of time if compaction runs incrementally in the background.
Hi! Yes, compaction runs automatically in the background and when it runs and the process by which it runs depends on the compaction strategy for the table.
By the way, there is a way to force auto compactions to be turned off:
alter table <tablename> with compaction = { 'class':'CompactionStrategy', 'enabled':'false};
However, that's not the default so someone would have had to turn that off.
Compactions run as part of the normal operation of Cassandra nodes. Table compactions on a node get triggered when certain thresholds are met. These triggers are dependent on the compaction strategy and compaction sub-properties configured for each table.
The number of SSTables after bulk-loading data isn't something you should be concerned with. New SSTables getting created is normal and there is nothing unusual about it. It happens when memtables are flushed to disk or when older SSTables are compacted into a new SSTable.
If you're interested, this video extract from the DS201 Cassandra Foundations course at the DataStax Academy talks about compactions in more detail. Cheers!
7 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use