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 F0488C75E for ; Fri, 11 May 2012 06:53:35 +0000 (UTC) Received: (qmail 16444 invoked by uid 500); 11 May 2012 06:53:33 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 16339 invoked by uid 500); 11 May 2012 06:53:33 -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 16312 invoked by uid 99); 11 May 2012 06:53:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 06:53:32 +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.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-ob0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 06:53:26 +0000 Received: by obbeh20 with SMTP id eh20so3433413obb.31 for ; Thu, 10 May 2012 23:53:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=F99rJqjJ5GAYId1Mwyp6BcQnF1OaLZ+Q9fGzEQu4VlA=; b=PE3w8gAGWeYnuJCUm1xUk1/FpXT5Spha6/n1vsErkkK0DP614i7wm5Bhe2UsaV6QOP nqZpnJ5rjOSHY9Pwv+wlkuyK3GKTxGmnEb1kKWljBwhC5Qluc+gOMFtnVfcCRa/QaNxY XOIrFcF8kzTthEc/4sPa19DKBrO4jpeS5toVkc6qJZKSfSuRHjljmtCNurftiFiDLhPa jzdNWv7RibP5N1LuarVlXmEZa3vbAdGQ58sJEJ6Q1A4h3cReieLas4CRbZxUJiLFUXdP gDvuPfTVk0LDjM6VNHKAaLNemK9MTwMDOLBDDjj7S3APwqdE2wyU3q1IQaodqI8D/uJl fiZQ== MIME-Version: 1.0 Received: by 10.60.14.41 with SMTP id m9mr9830713oec.57.1336719183894; Thu, 10 May 2012 23:53:03 -0700 (PDT) Received: by 10.60.65.161 with HTTP; Thu, 10 May 2012 23:53:03 -0700 (PDT) In-Reply-To: <839EAEF6-ADB0-4EDE-96F2-59391AAD3C62@gmail.com> References: <839EAEF6-ADB0-4EDE-96F2-59391AAD3C62@gmail.com> Date: Fri, 11 May 2012 08:53:03 +0200 Message-ID: Subject: Re: Concurrent major compaction From: Sylvain Lebresne To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmtXx2jExugBAvQWxq755h7Jw7g/9vd18LJ3+EBZhKDqFmj9p7/du31cLDY/rkCixfYP9Hp X-Virus-Checked: Checked by ClamAV on apache.org For the multithreaded compaction, https://issues.apache.org/jira/browse/CASSANDRA-4182 is relevant. Basically, because you do a major compaction every night, you do are in the case of '1 large sstables and a bunch of others', for which the design of multithreaded compaction won't help too much. For the concurrent part, this is due to the fact that major compaction grabs a global lock before running. We could (will) change that to be one lock per-CF (https://issues.apache.org/jira/browse/CASSANDRA-3430) but it's not done yet. If you feel adventurous and care enough, you can always try to apply the patch on CASSANDRA-3430, it should be fine if you don't use truncate. -- Sylvain On Thu, May 10, 2012 at 6:27 PM, Frederick Ryckbosch wrote: > Hi, > > We have a single-node cassandra that contains volatile data: every day ab= out 2 Gb of data is written, this data is kept for 7 days and then removed = (using TTL). To avoid that the application becomes slow during a large comp= action, we do a major compaction every night (less users, less performance = impact). > > The major compaction is CPU bound: it uses about 1 core and only consumes= 4 Mb/sec disk IO. We would like to scale the compaction with the resources= available in the machine (cores, disks). Enabling multithreaded_compaction= didn't help a lot, the CPU usage goes up to 120% of one core, but does not= scale with the number of cores. > > To make the compaction scale with the number of cores in our machine, we = tried to perform a major compaction on multiple column families (in the sam= e keyspace) at the same time using `nodetool -h localhost compact testSpace= data1 data2`, however the 2 compactions are executed serially in stead of = concurrently, with concurrent_compactors set to 4 (the number of cores). > > Is this normal behavior (both the multihreading and concurrent compaction= s) ? Is there any way to make the major compactions scale with the number o= f cores in the machine ? > > Thanks ! > Frederick >