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

 

question

Gangadhara M.B avatar image
Gangadhara M.B asked ·

How do we know when to schedule compaction?

Are there any logic/method/program/script to find out when do really need to run compaction on keyspace/table.

In general if we say we need to schedule compaction job on each node business asking us how do you find out when keyspaces/table needs compaction to be run ?.

We don't have any monitoring tools like OpsCenter or Prometheus , we are entirely dependent on nodetool or any command line tools if any

compaction
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

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.

I 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!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.