Saturday, March 16, 2019

Garbage collect in Cassandra (Removing deleted data from tables)


Follow the following steps for the current session of the terminal or make changes in the yaml configuration.

Set compaction throughput to 0 so that there won’t be any throttling.

nodetool setcompactionthroughput 0

Then set concurrentcompactors to number of CPU’S excluding hyper threading. (lscpu ==> Core(s) per socket * socket(s))

nodetool setconcurrentcompactors 32

To do garage collect run below command.

nodetool garbagecollect -g CELL keyspace_name table_name

Verifying status:
nodetool compactionstats


***

No comments:

Post a Comment