You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jean Tremblay <je...@zen-innovations.com> on 2015/05/14 15:06:22 UTC

LeveledCompactionStrategy

Hi,

I’m using Cassandra 2.1.4 with a table using LeveledCompactionStrategy.
Often I need to delete many rows and I want to make sure I don’t have too many tombstones.

How does one get rid of tombstones in a table using LCS?
How can we monitor how many tombstones are around?

Thanks for your help.

Jean

Re: LeveledCompactionStrategy

Posted by Jean Tremblay <je...@zen-innovations.com>.
Thanks a lot.
On 14 May 2015, at 22:45 , Nate McCall <na...@thelastpickle.com>> wrote:

You can make LCS more aggressive with tombstone-only compactions via seting unchecked_tombstone_compaction=true and turn down tombstone_threshold to 0.05 (maybe going up or down as needed). Details on both can be found here: http://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html

As for monitoring tombstones, there is a "tombstoneScannedHistogram" on ColumnFamilyMetrics which measures how many tombstones were discarded during reads.

Also, you should take a couple of SSTables from production and use the sstablemetadata utility specifically looking at "Estimated droppable tombstones" and "Estimated tombstone drop times" output from such.

Spend some time experimenting with those settings incrementally. Finding the sweet spot is different for each workload will make a huge difference in overall performance.



On Thu, May 14, 2015 at 8:06 AM, Jean Tremblay <je...@zen-innovations.com>> wrote:
>
> Hi,
>
> I’m using Cassandra 2.1.4 with a table using LeveledCompactionStrategy.
> Often I need to delete many rows and I want to make sure I don’t have too many tombstones.
>
> How does one get rid of tombstones in a table using LCS?
> How can we monitor how many tombstones are around?
>
> Thanks for your help.
>
> Jean




--
-----------------
Nate McCall
Austin, TX
@zznate

Co-Founder & Sr. Technical Consultant
Apache Cassandra Consulting
http://www.thelastpickle.com<http://www.thelastpickle.com/>


Re: LeveledCompactionStrategy

Posted by Stefano Ortolani <os...@gmail.com>.
Hi Jean,

I am trying to solve a similar problem here. I would say that the only
deterministic way is to rebuild the SStable of that column family via
nodetool scrub.

Otherwise you'd need to :
* decrease tombstone_threshold
* wait for gc_grace_time

Cheers,
Stefano



On Tue, May 26, 2015 at 12:51 PM, Jean Tremblay <
jean.tremblay@zen-innovations.com> wrote:

>  I played around with these settings, namely the tombstone_threshold, and
> it **eventually** triggered a Tombstone Compaction.
> Now I see that getting rid of these Tombstone is a process which takes
> some times.
>
>  I would like to be able to schedule a Tombstone Compaction.
>
>  Is there a way to trigger immediately a Tombstone Compaction on a table
> which is using LeveledCompactionStrategy?
>
>
>  Thanks a lot for your help
>
>  Jean
>
>  On 14 May 2015, at 22:45 , Nate McCall <na...@thelastpickle.com> wrote:
>
>  You can make LCS more aggressive with tombstone-only compactions via
> seting unchecked_tombstone_compaction=true and turn down
> tombstone_threshold to 0.05 (maybe going up or down as needed). Details on
> both can be found here:
> http://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html
>
>  As for monitoring tombstones, there is a "tombstoneScannedHistogram" on
> ColumnFamilyMetrics which measures how many tombstones were discarded
> during reads.
>
>  Also, you should take a couple of SSTables from production and use the
> sstablemetadata utility specifically looking at "Estimated droppable
> tombstones" and "Estimated tombstone drop times" output from such.
>
>  Spend some time experimenting with those settings incrementally. Finding
> the sweet spot is different for each workload will make a huge difference
> in overall performance.
>
>
>
> On Thu, May 14, 2015 at 8:06 AM, Jean Tremblay <
> jean.tremblay@zen-innovations.com> wrote:
> >
> > Hi,
> >
> > I’m using Cassandra 2.1.4 with a table using LeveledCompactionStrategy.
> > Often I need to delete many rows and I want to make sure I don’t have
> too many tombstones.
> >
> > How does one get rid of tombstones in a table using LCS?
> > How can we monitor how many tombstones are around?
> >
> > Thanks for your help.
> >
> > Jean
>
>
>
>
> --
> -----------------
> Nate McCall
> Austin, TX
> @zznate
>
> Co-Founder & Sr. Technical Consultant
> Apache Cassandra Consulting
> http://www.thelastpickle.com
>
>
>

Re: LeveledCompactionStrategy

Posted by Jean Tremblay <je...@zen-innovations.com>.
I played around with these settings, namely the tombstone_threshold, and it **eventually** triggered a Tombstone Compaction.
Now I see that getting rid of these Tombstone is a process which takes some times.

I would like to be able to schedule a Tombstone Compaction.

Is there a way to trigger immediately a Tombstone Compaction on a table which is using LeveledCompactionStrategy?


Thanks a lot for your help

Jean

On 14 May 2015, at 22:45 , Nate McCall <na...@thelastpickle.com>> wrote:

You can make LCS more aggressive with tombstone-only compactions via seting unchecked_tombstone_compaction=true and turn down tombstone_threshold to 0.05 (maybe going up or down as needed). Details on both can be found here: http://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html

As for monitoring tombstones, there is a "tombstoneScannedHistogram" on ColumnFamilyMetrics which measures how many tombstones were discarded during reads.

Also, you should take a couple of SSTables from production and use the sstablemetadata utility specifically looking at "Estimated droppable tombstones" and "Estimated tombstone drop times" output from such.

Spend some time experimenting with those settings incrementally. Finding the sweet spot is different for each workload will make a huge difference in overall performance.



On Thu, May 14, 2015 at 8:06 AM, Jean Tremblay <je...@zen-innovations.com>> wrote:
>
> Hi,
>
> I’m using Cassandra 2.1.4 with a table using LeveledCompactionStrategy.
> Often I need to delete many rows and I want to make sure I don’t have too many tombstones.
>
> How does one get rid of tombstones in a table using LCS?
> How can we monitor how many tombstones are around?
>
> Thanks for your help.
>
> Jean




--
-----------------
Nate McCall
Austin, TX
@zznate

Co-Founder & Sr. Technical Consultant
Apache Cassandra Consulting
http://www.thelastpickle.com<http://www.thelastpickle.com/>


Re: LeveledCompactionStrategy

Posted by Nate McCall <na...@thelastpickle.com>.
You can make LCS more aggressive with tombstone-only compactions via seting
unchecked_tombstone_compaction=true and turn down tombstone_threshold to
0.05 (maybe going up or down as needed). Details on both can be found here:
http://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html

As for monitoring tombstones, there is a "tombstoneScannedHistogram" on
ColumnFamilyMetrics which measures how many tombstones were discarded
during reads.

Also, you should take a couple of SSTables from production and use the
sstablemetadata utility specifically looking at "Estimated droppable
tombstones" and "Estimated tombstone drop times" output from such.

Spend some time experimenting with those settings incrementally. Finding
the sweet spot is different for each workload will make a huge difference
in overall performance.



On Thu, May 14, 2015 at 8:06 AM, Jean Tremblay <
jean.tremblay@zen-innovations.com> wrote:
>
> Hi,
>
> I’m using Cassandra 2.1.4 with a table using LeveledCompactionStrategy.
> Often I need to delete many rows and I want to make sure I don’t have too
many tombstones.
>
> How does one get rid of tombstones in a table using LCS?
> How can we monitor how many tombstones are around?
>
> Thanks for your help.
>
> Jean




--
-----------------
Nate McCall
Austin, TX
@zznate

Co-Founder & Sr. Technical Consultant
Apache Cassandra Consulting
http://www.thelastpickle.com