What is the difference between working procedure of below 2 commands. How differently these are working

nodetool garbagecollect


nodetool compact -s

1 Answer 1


So nodetool garbagecollect runs a single-SSTable compaction, with the intent of removing the current, eligible tombstones.

nodetool compact -s as-is invokes compaction and splits the resulting SSTable files into smaller-sized files (instead of just one large file). It is recommended to run this command while specifying both a target keyspace and table.

For more info on this one, check out Why is forcing major compaction on a table not ideal?

  • 1
    Thanks Aaron for clarifying.Actually in my project I saw this big sstable of 250 GB generated due to major compaction practice (with nodetool compact command) by previous team members. I tried to run nodetool compact -s with the intention to segrgate,but that never worked. seems its not working properly (V3.11.5). I am now planning for sstablesplit Mar 16, 2023 at 9:03

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.