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 E29E990C4 for ; Tue, 17 Apr 2012 09:53:49 +0000 (UTC) Received: (qmail 5790 invoked by uid 500); 17 Apr 2012 09:53:47 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 5764 invoked by uid 500); 17 Apr 2012 09:53:46 -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 5719 invoked by uid 99); 17 Apr 2012 09:53:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 09:53:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a55.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 09:53:38 +0000 Received: from homiemail-a55.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a55.g.dreamhost.com (Postfix) with ESMTP id 1BA3B12C0DA for ; Tue, 17 Apr 2012 02:52:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=L0iDFd6xSg Fg5iiK5to+knk53DaGaT70/RXSd5DJV1r3pWa5Kxju1WFelIixmx/DiCJjbqB/c/ RO2NwxmjP5ACZtXzMSjsek3bJfxAJKticLTuQe+a44m0NX8Bb/h7IFd9/ddJyq5U p39vSS3nczEZ3bxE4Uq2wlg/+OVIeXsKk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=F0937QxAzXMBiWqU +0i8bBWqNGw=; b=zaUliZQ8OuTggHSY2kPQN1rtMHDD9wzDJLqQcOn8dUArMx9c GIf/fnlmarA8KEzEYgcpYwnTtfJqi4dVYCUeq+qWbYCA2k3ZjX1pWi3BziXyrCjC QDifP/oeGnfLn8sYT7YSs/bkEV5JmXRjvm2fX6kt2eyrsUIYtUV3Dd/IWF4= Received: from [172.16.1.3] (125-236-193-159.adsl.xtra.co.nz [125.236.193.159]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a55.g.dreamhost.com (Postfix) with ESMTPSA id 874A712C0D4 for ; Tue, 17 Apr 2012 02:52:56 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: multipart/alternative; boundary="Apple-Mail=_10463BA1-6096-4609-986A-93D63FB94109" Subject: Re: Poor write performance with seconrady index Date: Tue, 17 Apr 2012 21:52:53 +1200 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: <35D93A89-556F-4A13-84FA-6E0E8599E5F0@thelastpickle.com> X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_10463BA1-6096-4609-986A-93D63FB94109 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Secondary indexes require a read and a write (potentially two) for every = update. Regular mutations are no look writes and are much faster.=20 Just like in a RDBMS, it's more efficient to insert data and then create = the index than to insert data with the index present.=20 An alternative is to create SSTables in the hadoop jobs and bulk load = them into the cluster.=20 Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 17/04/2012, at 2:51 AM, Patrik Modesto wrote: > Hi, >=20 > I've a 4 node test cluster running Cassandra 1.0.9, 32GB memory, 4x > 1TB disks. I've two keyspaces, rfTest2 (RF=3D2) and rfTest3 (RF=3D3). > There are two CF, one with source data and one with secondary index: >=20 > create column family UrlGroup > with column_type=3DStandard > and comparator=3DUTF8Type > and default_validation_class=3DUTF8Type > and key_validation_class=3DUTF8Type > and column_metadata=3D > [{ > column_name: groupId, > validation_class: UTF8Type, > index_type: KEYS > }]; >=20 > I'm running Hadoop mapreduce job, reading the source CF and creating 3 > mutations for each row-key in the UrlGroup CF. >=20 > The mapreduce runs for 30minutes. When I remove the secondary index, > the mapreduce runs just 10minutes. There are 26,273,544 mutations > total. >=20 > Also with the secondary index, the nodes show very high load 50+ and > iowait 70%+. Without secondary index the load is ~5 and iowait ~10%. >=20 > What may be the problem? >=20 > Regards, > Patrik --Apple-Mail=_10463BA1-6096-4609-986A-93D63FB94109 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
http://www.thelastpickle.com

On 17/04/2012, at 2:51 AM, Patrik Modesto wrote:

Hi,

I've a 4 node test cluster running = Cassandra 1.0.9, 32GB memory, 4x
1TB disks. I've two keyspaces, = rfTest2 (RF=3D2) and rfTest3 (RF=3D3).
There are two CF, one with = source data and one with secondary index:

create column family = UrlGroup
   with column_type=3DStandard
=    and comparator=3DUTF8Type
   and = default_validation_class=3DUTF8Type
   and = key_validation_class=3DUTF8Type
   and = column_metadata=3D
   [{
=        column_name: groupId,
=        validation_class: = UTF8Type,
       index_type: = KEYS
   }];

I'm running Hadoop mapreduce job, = reading the source CF and creating 3
mutations for each row-key in = the UrlGroup CF.

The mapreduce runs for 30minutes. When I remove = the secondary index,
the mapreduce runs just 10minutes. There are = 26,273,544 mutations
total.

Also with the secondary index, the = nodes show very high load 50+ and
iowait 70%+. Without secondary = index the load is ~5 and iowait ~10%.

What may be the = problem?

Regards,
Patrik

<= /body>= --Apple-Mail=_10463BA1-6096-4609-986A-93D63FB94109--