You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Noorul Islam K M <no...@noorul.com> on 2016/02/29 14:36:34 UTC

Too many sstables with DateTieredCompactionStrategy

Hi all,

We are using below compaction settings for a table

compaction = {'timestamp_resolution': 'MILLISECONDS',
'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}

But it is creating too many sstables. Currently number of sstables
is 40000. We have been injecting data for the last three days.

We have set the compactionthroughput to 128 MB/s

$ nodetool getcompactionthroughput

Current compaction throughput: 128 MB/s

But this is not helping. 

How can we control the number of sstables in this case?

Thanks and Regards
Noorul

Re: Too many sstables with DateTieredCompactionStrategy

Posted by Noorul Islam K M <no...@noorul.com>.
Lyubo Kamenov <kl...@heroku.com> writes:

> Maybe increase the number of tables that can be compacted by minor
> compactions[1],
> i.e. max_threshold (default is set to 32).
>
> 1.
> https://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html?scroll=compactSubprop__compactionSubpropertiesDTCS
>

I see that after the timestamp_resolution change to MICROSECONDS, slowly
the count is decreasing. I will give it some more time and if not
helping I will try putting higher value for max_threshold.

Thanks and Regards
Noorul

> On Mon, Feb 29, 2016 at 9:28 PM, Noorul Islam Kamal Malmiyoda <
> noorul@noorul.com> wrote:
>
>> Hello Marcus,
>>
>> I altered the table to set timestamp_resolution to 'MICROSECONDS'. I
>> waited for sometime, but the sstable count did not come down. Do you
>> think I should specific command to reduce the count of sstables after
>> setting this?
>>
>> Thanks and Regards
>> Noorul
>>
>>
>> On Mon, Feb 29, 2016 at 7:22 PM, Marcus Eriksson <kr...@gmail.com>
>> wrote:
>> > why do you have 'timestamp_resolution': 'MILLISECONDS'? It should be
>> left as
>> > default (MICROSECONDS) unless you do "USING TIMESTAMP
>> > <milliseconds>"-inserts, see
>> > https://issues.apache.org/jira/browse/CASSANDRA-11041
>> >
>> > On Mon, Feb 29, 2016 at 2:36 PM, Noorul Islam K M <no...@noorul.com>
>> wrote:
>> >>
>> >>
>> >> Hi all,
>> >>
>> >> We are using below compaction settings for a table
>> >>
>> >> compaction = {'timestamp_resolution': 'MILLISECONDS',
>> >> 'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
>> >> 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
>> >>
>> >> But it is creating too many sstables. Currently number of sstables
>> >> is 40000. We have been injecting data for the last three days.
>> >>
>> >> We have set the compactionthroughput to 128 MB/s
>> >>
>> >> $ nodetool getcompactionthroughput
>> >>
>> >> Current compaction throughput: 128 MB/s
>> >>
>> >> But this is not helping.
>> >>
>> >> How can we control the number of sstables in this case?
>> >>
>> >> Thanks and Regards
>> >> Noorul
>> >
>> >
>>

Re: Too many sstables with DateTieredCompactionStrategy

Posted by Lyubo Kamenov <kl...@heroku.com>.
Maybe increase the number of tables that can be compacted by minor
compactions[1],
i.e. max_threshold (default is set to 32).

1.
https://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html?scroll=compactSubprop__compactionSubpropertiesDTCS

On Mon, Feb 29, 2016 at 9:28 PM, Noorul Islam Kamal Malmiyoda <
noorul@noorul.com> wrote:

> Hello Marcus,
>
> I altered the table to set timestamp_resolution to 'MICROSECONDS'. I
> waited for sometime, but the sstable count did not come down. Do you
> think I should specific command to reduce the count of sstables after
> setting this?
>
> Thanks and Regards
> Noorul
>
>
> On Mon, Feb 29, 2016 at 7:22 PM, Marcus Eriksson <kr...@gmail.com>
> wrote:
> > why do you have 'timestamp_resolution': 'MILLISECONDS'? It should be
> left as
> > default (MICROSECONDS) unless you do "USING TIMESTAMP
> > <milliseconds>"-inserts, see
> > https://issues.apache.org/jira/browse/CASSANDRA-11041
> >
> > On Mon, Feb 29, 2016 at 2:36 PM, Noorul Islam K M <no...@noorul.com>
> wrote:
> >>
> >>
> >> Hi all,
> >>
> >> We are using below compaction settings for a table
> >>
> >> compaction = {'timestamp_resolution': 'MILLISECONDS',
> >> 'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
> >> 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
> >>
> >> But it is creating too many sstables. Currently number of sstables
> >> is 40000. We have been injecting data for the last three days.
> >>
> >> We have set the compactionthroughput to 128 MB/s
> >>
> >> $ nodetool getcompactionthroughput
> >>
> >> Current compaction throughput: 128 MB/s
> >>
> >> But this is not helping.
> >>
> >> How can we control the number of sstables in this case?
> >>
> >> Thanks and Regards
> >> Noorul
> >
> >
>

Re: Too many sstables with DateTieredCompactionStrategy

Posted by Noorul Islam Kamal Malmiyoda <no...@noorul.com>.
Hello Marcus,

I altered the table to set timestamp_resolution to 'MICROSECONDS'. I
waited for sometime, but the sstable count did not come down. Do you
think I should specific command to reduce the count of sstables after
setting this?

Thanks and Regards
Noorul


On Mon, Feb 29, 2016 at 7:22 PM, Marcus Eriksson <kr...@gmail.com> wrote:
> why do you have 'timestamp_resolution': 'MILLISECONDS'? It should be left as
> default (MICROSECONDS) unless you do "USING TIMESTAMP
> <milliseconds>"-inserts, see
> https://issues.apache.org/jira/browse/CASSANDRA-11041
>
> On Mon, Feb 29, 2016 at 2:36 PM, Noorul Islam K M <no...@noorul.com> wrote:
>>
>>
>> Hi all,
>>
>> We are using below compaction settings for a table
>>
>> compaction = {'timestamp_resolution': 'MILLISECONDS',
>> 'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
>> 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
>>
>> But it is creating too many sstables. Currently number of sstables
>> is 40000. We have been injecting data for the last three days.
>>
>> We have set the compactionthroughput to 128 MB/s
>>
>> $ nodetool getcompactionthroughput
>>
>> Current compaction throughput: 128 MB/s
>>
>> But this is not helping.
>>
>> How can we control the number of sstables in this case?
>>
>> Thanks and Regards
>> Noorul
>
>

Re: Too many sstables with DateTieredCompactionStrategy

Posted by Marcus Eriksson <kr...@gmail.com>.
why do you have 'timestamp_resolution': 'MILLISECONDS'? It should be left
as default (MICROSECONDS) unless you do "USING TIMESTAMP
<milliseconds>"-inserts, see
https://issues.apache.org/jira/browse/CASSANDRA-11041

On Mon, Feb 29, 2016 at 2:36 PM, Noorul Islam K M <no...@noorul.com> wrote:

>
> Hi all,
>
> We are using below compaction settings for a table
>
> compaction = {'timestamp_resolution': 'MILLISECONDS',
> 'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
> 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
>
> But it is creating too many sstables. Currently number of sstables
> is 40000. We have been injecting data for the last three days.
>
> We have set the compactionthroughput to 128 MB/s
>
> $ nodetool getcompactionthroughput
>
> Current compaction throughput: 128 MB/s
>
> But this is not helping.
>
> How can we control the number of sstables in this case?
>
> Thanks and Regards
> Noorul
>

Re: Too many sstables with DateTieredCompactionStrategy

Posted by Noorul Islam K M <no...@noorul.com>.
Alain RODRIGUEZ <ar...@gmail.com> writes:

> Might be due to this:
>
> Fixed in 2.1.12 (Assuming you are using C*2.1):
> https://issues.apache.org/jira/browse/CASSANDRA-10422
>
> Some question to have more context:
>
>
>    1. What C* version are you using?

We are using DSE 4.8.3, hence Apache Cassandra 2.1.12.1046

>    2. Do you use vnodes?

Yes

>    3. How many vnodes per node?

32

>    4. How many nodes / DC do you have?

We have 3 DCs

cassandra, spark and solr.

The keyspace has RF 3 in cassandra and solr DC.


>    5. How do you run repairs (tool & command)?

We enabled auto repair feature provided by OpsCenter.

Thanks and Regards
Noorul


> C*heers,
>
> -----------------------
> Alain Rodriguez - alain@thelastpickle.com
> France
>
> The Last Pickle - Apache Cassandra Consulting
> http://www.thelastpickle.com
>
> 2016-02-29 15:50 GMT+01:00 Noorul Islam Kamal Malmiyoda <no...@noorul.com>:
>
>> Yes, we have enabled it on OpsCenter. Is that the reason?
>> On Feb 29, 2016 8:07 PM, "Dominik Keil" <do...@movilizer.com>
>> wrote:
>>
>>> Are you using incremental repais?
>>>
>>> Am 29.02.2016 um 14:36 schrieb Noorul Islam K M:
>>>
>>> Hi all,
>>>
>>> We are using below compaction settings for a table
>>>
>>> compaction = {'timestamp_resolution': 'MILLISECONDS',
>>> 'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
>>> 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
>>>
>>> But it is creating too many sstables. Currently number of sstables
>>> is 40000. We have been injecting data for the last three days.
>>>
>>> We have set the compactionthroughput to 128 MB/s
>>>
>>> $ nodetool getcompactionthroughput
>>>
>>> Current compaction throughput: 128 MB/s
>>>
>>> But this is not helping.
>>>
>>> How can we control the number of sstables in this case?
>>>
>>> Thanks and Regards
>>> Noorul
>>>
>>>
>>> --
>>> *Dominik Keil*
>>> Phone: + 49 (0) 621 150 207 31
>>> Mobile: + 49 (0) 151 626 602 14
>>>
>>> Movilizer GmbH
>>> Julius-Hatry-Strasse 1
>>> 68163 Mannheim
>>> Germany
>>>
>>> movilizer.com
>>>
>>> [image: Visit company website] <http://movilizer.com/>
>>> *Reinvent Your Mobile Enterprise*
>>>
>>> <http://movilizer.com/training>
>>> <http://movilizer.com/training>
>>>
>>> *Be the first to know:*
>>> Twitter <https://twitter.com/Movilizer> | LinkedIn
>>> <https://www.linkedin.com/company/movilizer-gmbh> | Facebook
>>> <https://www.facebook.com/Movilizer> | stack overflow
>>> <http://stackoverflow.com/questions/tagged/movilizer>
>>>
>>> Company's registered office: Mannheim HRB: 700323 / Country Court:
>>> Mannheim Managing Directors: Alberto Zamora, Jörg Bernauer, Oliver Lesche
>>> Please inform us immediately if this e-mail and/or any attachment was
>>> transmitted incompletely or was not intelligible.
>>>
>>> This e-mail and any attachment is for authorized use by the intended
>>> recipient(s) only. It may contain proprietary material, confidential
>>> information and/or be subject to legal privilege. It should not be
>>> copied, disclosed to, retained or used by any other party. If you are not
>>> an intended recipient then please promptly delete this e-mail and any
>>> attachment and all copies and inform the sender.
>>
>>

Re: Too many sstables with DateTieredCompactionStrategy

Posted by Alain RODRIGUEZ <ar...@gmail.com>.
Might be due to this:

Fixed in 2.1.12 (Assuming you are using C*2.1):
https://issues.apache.org/jira/browse/CASSANDRA-10422

Some question to have more context:


   1. What C* version are you using?
   2. Do you use vnodes?
   3. How many vnodes per node?
   4. How many nodes / DC do you have?
   5. How do you run repairs (tool & command)?


C*heers,

-----------------------
Alain Rodriguez - alain@thelastpickle.com
France

The Last Pickle - Apache Cassandra Consulting
http://www.thelastpickle.com

2016-02-29 15:50 GMT+01:00 Noorul Islam Kamal Malmiyoda <no...@noorul.com>:

> Yes, we have enabled it on OpsCenter. Is that the reason?
> On Feb 29, 2016 8:07 PM, "Dominik Keil" <do...@movilizer.com>
> wrote:
>
>> Are you using incremental repais?
>>
>> Am 29.02.2016 um 14:36 schrieb Noorul Islam K M:
>>
>> Hi all,
>>
>> We are using below compaction settings for a table
>>
>> compaction = {'timestamp_resolution': 'MILLISECONDS',
>> 'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
>> 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
>>
>> But it is creating too many sstables. Currently number of sstables
>> is 40000. We have been injecting data for the last three days.
>>
>> We have set the compactionthroughput to 128 MB/s
>>
>> $ nodetool getcompactionthroughput
>>
>> Current compaction throughput: 128 MB/s
>>
>> But this is not helping.
>>
>> How can we control the number of sstables in this case?
>>
>> Thanks and Regards
>> Noorul
>>
>>
>> --
>> *Dominik Keil*
>> Phone: + 49 (0) 621 150 207 31
>> Mobile: + 49 (0) 151 626 602 14
>>
>> Movilizer GmbH
>> Julius-Hatry-Strasse 1
>> 68163 Mannheim
>> Germany
>>
>> movilizer.com
>>
>> [image: Visit company website] <http://movilizer.com/>
>> *Reinvent Your Mobile Enterprise*
>>
>> <http://movilizer.com/training>
>> <http://movilizer.com/training>
>>
>> *Be the first to know:*
>> Twitter <https://twitter.com/Movilizer> | LinkedIn
>> <https://www.linkedin.com/company/movilizer-gmbh> | Facebook
>> <https://www.facebook.com/Movilizer> | stack overflow
>> <http://stackoverflow.com/questions/tagged/movilizer>
>>
>> Company's registered office: Mannheim HRB: 700323 / Country Court:
>> Mannheim Managing Directors: Alberto Zamora, Jörg Bernauer, Oliver Lesche
>> Please inform us immediately if this e-mail and/or any attachment was
>> transmitted incompletely or was not intelligible.
>>
>> This e-mail and any attachment is for authorized use by the intended
>> recipient(s) only. It may contain proprietary material, confidential
>> information and/or be subject to legal privilege. It should not be
>> copied, disclosed to, retained or used by any other party. If you are not
>> an intended recipient then please promptly delete this e-mail and any
>> attachment and all copies and inform the sender.
>
>

Re: Too many sstables with DateTieredCompactionStrategy

Posted by Noorul Islam Kamal Malmiyoda <no...@noorul.com>.
Yes, we have enabled it on OpsCenter. Is that the reason?
On Feb 29, 2016 8:07 PM, "Dominik Keil" <do...@movilizer.com> wrote:

> Are you using incremental repais?
>
> Am 29.02.2016 um 14:36 schrieb Noorul Islam K M:
>
>
> Hi all,
>
> We are using below compaction settings for a table
>
> compaction = {'timestamp_resolution': 'MILLISECONDS',
> 'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
> 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
>
> But it is creating too many sstables. Currently number of sstables
> is 40000. We have been injecting data for the last three days.
>
> We have set the compactionthroughput to 128 MB/s
>
> $ nodetool getcompactionthroughput
>
> Current compaction throughput: 128 MB/s
>
> But this is not helping.
>
> How can we control the number of sstables in this case?
>
> Thanks and Regards
> Noorul
>
>
> --
> *Dominik Keil*
> Phone: + 49 (0) 621 150 207 31
> Mobile: + 49 (0) 151 626 602 14
>
> Movilizer GmbH
> Julius-Hatry-Strasse 1
> 68163 Mannheim
> Germany
>
> movilizer.com
>
> [image: Visit company website] <http://movilizer.com/>
> *Reinvent Your Mobile Enterprise*
>
> <http://movilizer.com/training>
> <http://movilizer.com/training>
>
> *Be the first to know:*
> Twitter <https://twitter.com/Movilizer> | LinkedIn
> <https://www.linkedin.com/company/movilizer-gmbh> | Facebook
> <https://www.facebook.com/Movilizer> | stack overflow
> <http://stackoverflow.com/questions/tagged/movilizer>
>
> Company's registered office: Mannheim HRB: 700323 / Country Court:
> Mannheim Managing Directors: Alberto Zamora, Jörg Bernauer, Oliver Lesche
> Please inform us immediately if this e-mail and/or any attachment was
> transmitted incompletely or was not intelligible.
>
> This e-mail and any attachment is for authorized use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be
> copied, disclosed to, retained or used by any other party. If you are not
> an intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender.

Re: Too many sstables with DateTieredCompactionStrategy

Posted by Dominik Keil <do...@movilizer.com>.
Are you using incremental repais?

Am 29.02.2016 um 14:36 schrieb Noorul Islam K M:
> Hi all,
>
> We are using below compaction settings for a table
>
> compaction = {'timestamp_resolution': 'MILLISECONDS',
> 'max_sstable_age_days': '365', 'base_time_seconds': '60', 'class':
> 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
>
> But it is creating too many sstables. Currently number of sstables
> is 40000. We have been injecting data for the last three days.
>
> We have set the compactionthroughput to 128 MB/s
>
> $ nodetool getcompactionthroughput
>
> Current compaction throughput: 128 MB/s
>
> But this is not helping. 
>
> How can we control the number of sstables in this case?
>
> Thanks and Regards
> Noorul

-- 
*Dominik Keil*
Phone: + 49 (0) 621 150 207 31
Mobile: + 49 (0) 151 626 602 14

Movilizer GmbH
Julius-Hatry-Strasse 1
68163 Mannheim
Germany

-- 
movilizer.com

[image: Visit company website] <http://movilizer.com/>
*Reinvent Your Mobile Enterprise*

<http://movilizer.com/training>
<http://movilizer.com/training>

*Be the first to know:*
Twitter <https://twitter.com/Movilizer> | LinkedIn 
<https://www.linkedin.com/company/movilizer-gmbh> | Facebook 
<https://www.facebook.com/Movilizer> | stack overflow 
<http://stackoverflow.com/questions/tagged/movilizer>

Company's registered office: Mannheim HRB: 700323 / Country Court: Mannheim 
Managing Directors: Alberto Zamora, Jörg Bernauer, Oliver Lesche Please 
inform us immediately if this e-mail and/or any attachment was transmitted 
incompletely or was not intelligible.

This e-mail and any attachment is for authorized use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be 
copied, disclosed to, retained or used by any other party. If you are not 
an intended recipient then please promptly delete this e-mail and any 
attachment and all copies and inform the sender.