We have deleted some of the partionons of some tables in cassandra database. But after the delete space was not recliamed becuase of size-tiered compaction . Manualy compacted tables with -s options. we have cluster of having 2 data ceneters and each with 6 nodes, we ran compaction both the DC's of all nodes. But Disk usage on DC1 reduced but 6% increase on the other DC2. So please let me know the reason for this and also suggest me on the next steps 2 bring down the usage of disk on Dc2. for your information even load on both DC's are come down.

Even cleared old snapshots of around 1.3TB on all nodes

o/p command as of below comment 4 (find /path/to/dir/ -printf '%s %p\n'| sort -nr | head -10):

12434906818 /data1/cassandra/data/witsml/log_curve-c9311570d40d11e7af9a6b6facb54bee/.maxdatetimeindex_idx/md-283562-big-Data.db
4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-08-05/md-680-big-Data.db
4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-07-29/md-680-big-Data.db
4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-07-22/md-680-big-Data.db
4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-07-15/md-680-big-Data.db
4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-07-08/md-680-big-Data.db
4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-07-01/md-680-big-Data.db
4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-06-24/md-680-big-Data.db
4111835201 /data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/md-680-big-Data.db
3782418777 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-08-05/md-1963-big-Data.db
  • Have you looked at a similar post? These things might help triage this better: 1. Version of the Cassandra (for e.g. OSS C* 3.11.10) 2. Schema of the table 3. Exact query used to delete data 4. Also, could you post the output of command? ``` find /path/to/dir/ -printf '%s %p\n'| sort -nr | head -10 ```
    – Madhavan
    Commented Aug 10, 2022 at 13:20
  • Thanks for the answer :1 . version is Apache cassandra 3.11.2 (2) schema : total six tables 3 : Delete from table where partition='x' and object_id=x Commented Aug 10, 2022 at 21:24
  • output :12434906818 /data1/cassandra/data/witsml/log_curve-c9311570d40d11e7af9a6b6facb54bee/.maxdatetimeindex_idx/md-283562-big-Data.db 4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-08-05/md-680-big-Data.db 4111835201 Commented Aug 10, 2022 at 21:25
  • 4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-07-29/md-680-big-Data.db 4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-07-22/md-680-big-Data.db 4111835201 /data1/Full_Backup/data1/cassandra/data/system_distributed/parent_repair_history-deabd734b99d3b9c92e5fd92eb5abf14/snapshots/2022-07-15/md-680-big-Data.db Commented Aug 10, 2022 at 21:26
  • complete output of command in your 4th question is added to end of the question Commented Aug 10, 2022 at 21:29

1 Answer 1


So for possible reasons why space isn't reclaimed after running a major compaction, I can think of the following:

  • A snapshot of a table is hard-linked to the SSTable file(s).
  • The tombstones' gc_grace_seconds for the table has not expired (tombstones are still valid and won't get collected).

I would double-check the gc_grace_seconds (default of 10 days...864000 seconds) and maybe try running it again.

NOTE: Future Googlers, avoid running nodetool compact at all costs.

Compaction will likely never happen organically ever again, which means you'll need an ongoing ops process to run it regularly.

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.