cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <>
Subject Re: Question about minor compaction
Date Fri, 04 Nov 2011 17:32:57 GMT
On Fri, Nov 4, 2011 at 6:01 PM, Rene Kochen
<> wrote:
> Thanks for this very clear explanation.
> Could it be that Cassandra does not begin a minor compaction if there is memory pressure?

No (and in 0.7 Cassandra really does nothing specific under memory
pressure except being
constantly interrupted by the GC. But even in 1.0, compaction is not
one of the thing affected
by the memory pressure valves in place). It can not being a compaction
because it thinks that
it won't have enough disk space to do the compaction, but you'll have
a message in the log
if that happens.


> -----Original Message-----
> From: Sylvain Lebresne []
> Sent: vrijdag 4 november 2011 17:48
> To:
> Subject: Re: Question about minor compaction
> On Fri, Nov 4, 2011 at 5:22 PM, Rene Kochen
> <> 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 []
>> Sent: vrijdag 4 november 2011 16:48
>> To:
>> 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

View raw message