You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Peter Haggerty <pe...@librato.com> on 2013/04/04 17:36:07 UTC

Is there guidance about compaction thresholds and setting minthreshold to 2?

The default minthreshold for compactions is 4:
http://www.datastax.com/docs/1.1/references/nodetool#nodetool-setcompactionthreshold

Is there a reason that this value is not "2", the lowest possible value?
 If we change this to 2 what should we expect to see? Should we see less
growth in storage load and fewer files to seek through when reading but at
the cost of higher CPU usage?


Thanks,

Peter

Re: Is there guidance about compaction thresholds and setting minthreshold to 2?

Posted by Sylvain Lebresne <sy...@datastax.com>.
More importantly than CPU, you'll use more I/O. Say you have 4 (like-size)
sstables, compact them all into one file (which is really what
SizeTieredCompaction will try to do) will require twice as much I/O that
with min_compaction=2 versus 4.


On Thu, Apr 4, 2013 at 7:26 PM, Edward Capriolo <ed...@gmail.com>wrote:

> One would think, but remember only "like sized" sstables compact. You want
> more files roughlt the same size rather then few big ones in most cases,
> but there are no hard fast rules.
>
>
> On Thu, Apr 4, 2013 at 11:36 AM, Peter Haggerty <
> peter.haggerty@librato.com> wrote:
>
>> The default minthreshold for compactions is 4:
>>
>> http://www.datastax.com/docs/1.1/references/nodetool#nodetool-setcompactionthreshold
>>
>> Is there a reason that this value is not "2", the lowest possible value?
>>  If we change this to 2 what should we expect to see? Should we see less
>> growth in storage load and fewer files to seek through when reading but at
>> the cost of higher CPU usage?
>>
>>
>> Thanks,
>>
>> Peter
>>
>>
>

Re: Is there guidance about compaction thresholds and setting minthreshold to 2?

Posted by Edward Capriolo <ed...@gmail.com>.
One would think, but remember only "like sized" sstables compact. You want
more files roughlt the same size rather then few big ones in most cases,
but there are no hard fast rules.


On Thu, Apr 4, 2013 at 11:36 AM, Peter Haggerty
<pe...@librato.com>wrote:

> The default minthreshold for compactions is 4:
>
> http://www.datastax.com/docs/1.1/references/nodetool#nodetool-setcompactionthreshold
>
> Is there a reason that this value is not "2", the lowest possible value?
>  If we change this to 2 what should we expect to see? Should we see less
> growth in storage load and fewer files to seek through when reading but at
> the cost of higher CPU usage?
>
>
> Thanks,
>
> Peter
>
>