What is the best possible way to get rid of the big sstables (hundreds of GB in size) created by STCS compaction?

Will it be sstablesplit or nodetool compact -s?

2 Answers 2


Those two commands perform different operations and the "best way" depends on what you want to achieve.

sstablesplit as its name suggests will split SSTables into smaller files so they can be selected as compaction candidates by SizeTieredCompactionStrategy. Note however that it is an offline tool so Cassandra needs to be shutdown in order to run the tool.

As a workaround, you can split large SSTables on another server. I've previously documented the detailed steps in How do I split large SSTables on another server?.

The "split" option (-s or --split-output) for nodetool compact will force what's called a major compaction that will split SSTables into files which are 50% then 25% then 12.5% of the original table size until the smallest file is 50MB. Note however that this option is only available from Cassandra 2.2 or later releases.

There are disadvantages for running a manual compaction which I've explained in Why is forcing major compaction on a table not ideal? so it is something to be aware of.

Going back to your original question, what is "best" depends on your situation and will come down to whether you can afford to bring a node down or not. Hopefully the points I've raised above will help you decide. Cheers!

  • 1
    Nice explanation, bud!
    – Aaron
    Commented Feb 10, 2023 at 8:24
  • I totally Agree Erick. Thanks a lot for your valuable advise Commented Feb 10, 2023 at 9:42

SSTABLESPLIT is definitely the way to go.

Manually running compaction has a tendency to cause more problems that it's worth.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.