question avatar image asked Erick Ramirez commented

Does running manual compaction on LCS have the same consequences as STCS?


I have read multiple questions where it was explained that it is not ideal to run a manual compaction on Cassandra tables using SizeTieredCompactionStrategy. Also, it was noted that running the manual compaction even once would mean that we need to continue to do it manually going forward as well. So the temporary solution was given to split the output files.

My question is based on a weird scenario my team is in: There are 5 tables in the keyspace:

--- 4 of the tables are very small tables (5-10GB size) and use STCS

--- 1 large table (will reach 1-3 TB eventually) is using LCS. We decided on this compactionstrategy because this table is going to have lot of updates compared to inserts.

So, we have already run nodetool compact manually for this keyspace. Given this situation, I have the following questions.

1. [Follow up question posted in #10976]

2. [Follow up question posted in #11014]

3. [Follow up question posted in #11006]

Your suggestions and inputs are greatly appreciated.

Thank you,


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 Erick Ramirez commented

No, running a major compaction on LeveledCompactionStrategy doesn't run into the same issues that you would with SizeTieredCompactionStrategy.

The main drawback is that a major compaction on LCS will rewrite all the SSTables on the node and it will significantly impact the performance of your cluster.

I can't think of a reason why it would be necessary for you to trigger a major compaction on LCS tables. It is possible that you could be causing more problems than you are trying to solve.

If you have any concerns or issues with your tables, our engineers will be happy to work with you directly if you log a ticket with DataStax Support. Cheers!

2 comments 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. avatar image commented ·

Thank you very much for sharing your inputs Erick!! Really appreciate it.

0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ commented ·

Happy to help. Cheers!

0 Likes 0 ·