Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF9B799C8 for ; Fri, 4 Nov 2011 16:49:09 +0000 (UTC) Received: (qmail 21452 invoked by uid 500); 4 Nov 2011 16:49:07 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 21425 invoked by uid 500); 4 Nov 2011 16:49:07 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 21417 invoked by uid 99); 4 Nov 2011 16:49:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 16:49:07 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sylvain@datastax.com designates 209.85.161.172 as permitted sender) Received: from [209.85.161.172] (HELO mail-gx0-f172.google.com) (209.85.161.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 16:49:01 +0000 Received: by ggnv1 with SMTP id v1so3074658ggn.31 for ; Fri, 04 Nov 2011 09:48:40 -0700 (PDT) Received: by 10.236.179.2 with SMTP id g2mr21428768yhm.27.1320425320073; Fri, 04 Nov 2011 09:48:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.154.133 with HTTP; Fri, 4 Nov 2011 09:48:19 -0700 (PDT) X-Originating-IP: [88.183.33.171] In-Reply-To: References: <4EB3FCD6.4060706@sendmail.cz> <4EB40937.8060305@sendmail.cz> From: Sylvain Lebresne Date: Fri, 4 Nov 2011 17:48:19 +0100 Message-ID: Subject: Re: Question about minor compaction To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 si= milar 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 defau= lt values, a minor compaction may begin any time after four SSTables are cr= eated on disk for a column family, and must begin before 32 SSTables accumu= late." > > So a more general question: > > In which situation does Cassandra not start a minor compaction immediatel= y (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 >