You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Akshit Jain <ak...@iiitd.ac.in> on 2017/09/14 06:49:37 UTC

Compaction in cassandra

Is it helpful to run nodetool compaction in cassandra?
or automatic compaction is just fine.
Regards

RE: Compaction in cassandra

Posted by "Steinmaurer, Thomas" <th...@dynatrace.com>.
Hi,

usually automatic minor compactions are fine, but you may need much more free disk space to reclaim disk space via automatic minor compactions, especially in a time series use case with size-tiered compaction strategy (possibly with leveled as well, I’m not familiar with this strategy type). We are in the time series / STCS combination and currently plan to run a major compaction every X weeks. Although not perfect, this is currently our only way to effectively really get rid of out-dated data from disk, without the extra cost of storage we would additionally need, cause it needs a lot of time that delete markers (tombstones) according to our retention policy are actually getting automatically minor compacted with potentially large SSTables. Mind you, with pre 2.2, a major compaction results in a single (large) SSTable again, so the whole disk usage troubles start again. With 2.2+ there is an option to end up with SSTables in 50%, 25% etc.. in file size per column family / table, so this might be useful.

If you have a time series use case you may want to look at the new time window compaction strategy introduced in 3.0, but it relies on TTL-based time series data only. We tested it and it works great, but unfortunately we can’t use it, cause we may have different TTL/retention policies in a single column family, even varying retention configurations per customer over time, so TWCS not really an option here, unfortunately.

Thomas

From: Akshit Jain [mailto:akshit13124@iiitd.ac.in]
Sent: Donnerstag, 14. September 2017 08:50
To: user@cassandra.apache.org
Subject: Compaction in cassandra

Is it helpful to run nodetool compaction in cassandra?
or automatic compaction is just fine.
Regards

The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. Dynatrace Austria GmbH (registration number FN 91482h) is a company registered in Linz whose registered office is at 4040 Linz, Austria, Freistädterstraße 313

Re: Compaction in cassandra

Posted by Jeff Jirsa <jj...@gmail.com>.
Shouldn't need it under normal circumstances, and should avoid it unless you explicitly need it

-- 
Jeff Jirsa


> On Sep 13, 2017, at 11:49 PM, Akshit Jain <ak...@iiitd.ac.in> wrote:
> 
> Is it helpful to run nodetool compaction in cassandra?
> or automatic compaction is just fine.
> Regards
>