question

Gangadhara M.B avatar image
Gangadhara M.B asked Erick Ramirez edited

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

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

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