incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <sylv...@datastax.com>
Subject Re: Question about minor compaction
Date Fri, 04 Nov 2011 16:48:19 GMT
On Fri, Nov 4, 2011 at 5:22 PM, Rene Kochen
<Rene.Kochen@emea.schange.com> wrote:
> Thanks for your quick response.
>
> I indeed see that similar sized files are compacted. However, for four similar 1GB files,
this is not what I see.
>
> The documentation states:
>
> "These parameters set thresholds for the number of similar-sized SSTables that can accumulate
before a minor compaction is triggered. With the default values, a minor compaction may begin
any time after four SSTables are created on disk for a column family, and must begin before
32 SSTables accumulate."
>
> So a more general question:
>
> In which situation does Cassandra not start a minor compaction immediately (when there
are four similar sized files), but waits (up to 32)?

Cassandra looks if there is minor compaction that can be started after
each flush and after each compaction, so basically fairly regularly.
So it should usually compact files as soon as it can. That being said
compaction in 0.7.9 is mono-threaded so first it has to wait to other
running compaction before starting. Then it needs 4 files in the same
bucket (i.e have similar size), but it is possible that the sizes are
such that one of the sstable is just a little bit too small or too big
to be in the same bucket than the other three (in which case you'd
have to wait for some other sstable to come fill that bucket).

--
Sylvain

>
> Thanks!
>
> -----Original Message-----
> From: Radim Kolar [mailto:hsn@sendmail.cz]
> Sent: vrijdag 4 november 2011 16:48
> To: user@cassandra.apache.org
> Subject: Re: Question about minor compaction
>
> Dne 4.11.2011 16:16, Rene Kochen napsal(a):
>> I'm using Cassandra 0.7.9.
>>
>> Ok, so in this version, Cassandra waits with compaction. But when (in my original
example) are the four 1GB files compacted?
> There are compacted when next file of similar size to 1 GB is created
>

Mime
View raw message