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 CF05818474 for ; Tue, 9 Feb 2016 16:39:42 +0000 (UTC) Received: (qmail 65837 invoked by uid 500); 9 Feb 2016 16:39:40 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 65799 invoked by uid 500); 9 Feb 2016 16:39:40 -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 65789 invoked by uid 99); 9 Feb 2016 16:39:40 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2016 16:39:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A5DE318034B for ; Tue, 9 Feb 2016 16:39:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id m7P4xcn_yo-u for ; Tue, 9 Feb 2016 16:39:38 +0000 (UTC) Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 6C8A342B8C for ; Tue, 9 Feb 2016 16:39:38 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id xg9so80912837igb.1 for ; Tue, 09 Feb 2016 08:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=uvhGcwEyEUcNpYcGzq0A33ZNFCZ8uoahc/wTBSs7Emc=; b=SgRYH+LA6KfObQA6ypBAS23taQeG39fXga5rKZ7BkxukLHZYIIdRjZLtMXagHWrZA8 9O5q7tzeU/USSLNqnCL+eajNeBSZYI12poA0Q4efEW5b5CGGdK+LmRLWepLYX7xkYl/r U729z3/R5N7It3UclVYTj6JeOUd0jToHTXcdh17MIjJ0ORBK2jZssW9IJnRs9na++sAx HiRv1tajSjr/50V14DgvVpJ5dVbKEeN8+bR7kkGzLVN/gO6YpyzsSU3bhEhqfbdKxxk4 8qnToGzIapc+TiM0U0fPCQ+QKGl7qr5vZBb0mkyB91CdMW2KBwEaz5KKhS/6Q6+mAXBd Z4Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=uvhGcwEyEUcNpYcGzq0A33ZNFCZ8uoahc/wTBSs7Emc=; b=f2k/vrzlV1Bh2pCi49Zq6+zAMyGpDrVjzsfIrhRRdT+83zsP0Oe6DGzhoHfdf9ErZi XxhkIsGgNvf31Qvq7ZDRGGrxZrMIQHuS24oYvPGgqRf/0wmHjbavn28oQ1E8RkE6iWEz vsHLToFV6oN+uXlVnuA6jYqI73mPOE7zqw1MKHR8OG+IpuXjeL1zONf6zP9dI4hSZLfW ejDiq8zt9f4qzKz/2NlnTeYYjfkOv1WGXo/V/O6JbUc7d70VisUivz939CVQW2T7/+/5 8TqCljmIVmP4NSimk7jG9Zt+vK7XV3e7s2gBpEBxH5Fl1gbE95/yiMtVi5MZNwIO3ZWk fDAg== X-Gm-Message-State: AG10YORXqQHnELuLZqSmFmbD7YZ/520jZA1nwqDM3NTEY9Ad7JgZfKUFP6ypcr+4mheYn9Npe5qdVlYaLhNeXg== X-Received: by 10.50.142.33 with SMTP id rt1mr5437853igb.37.1455035971975; Tue, 09 Feb 2016 08:39:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.181.199 with HTTP; Tue, 9 Feb 2016 08:39:02 -0800 (PST) In-Reply-To: References: From: daemeon reiydelle Date: Tue, 9 Feb 2016 08:39:02 -0800 Message-ID: Subject: Re: Cassandra Collections performance issue To: user@cassandra.apache.org Cc: "Peddi, Praveen" Content-Type: multipart/alternative; boundary=001a1130d17a3ec53c052b58f6e0 --001a1130d17a3ec53c052b58f6e0 Content-Type: text/plain; charset=UTF-8 I think the key to your problem might be around "we overwrite every value". You are creating a large number of tombstones, forcing many reads to pull current results. You would do well to rethink why you are having to to overwrite values all the time under the same key. You would be better to figure out haw to add values under a key then age off the old values. I would say that (at least at scale) you have a classic anti-pattern in play. *.......* *Daemeon C.M. ReiydelleUSA (+1) 415.501.0198London (+44) (0) 20 8144 9872* On Mon, Feb 8, 2016 at 5:23 PM, Robert Coli wrote: > On Mon, Feb 8, 2016 at 2:10 PM, Agrawal, Pratik > wrote: > >> Recently we added one of the table fields from as Map in *Cassandra >> 2.1.11*. Currently we read every field from Map and overwrite map >> values. Map is of size 3. We saw that writes are 30-40% slower while reads >> are 70-80% slower. Please find below some metrics that can help. >> >> My question is, Are there any known issues in Cassandra map performance? >> As I understand it each of the CQL3 Map entry, maps to a column in >> cassandra, with that assumption we are just creating 3 columns right? Any >> insight on this issue would be helpful. >> > > I have previously heard reports along similar lines, but in the other > direction. > > eg - "I moved from a collection to a TEXT column with JSON in it, and my > reads and writes both became much faster!" > > I'm not sure if the issue has been raised as an Apache Cassandra Jira, iow > if it is a known and expected limitation as opposed to just a performance > issue. > > If I were you, I would consider filing a repro case as a Jira ticket, and > responding to this thread with its URL. :D > > =Rob > > --001a1130d17a3ec53c052b58f6e0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I think the key to your problem might = be around "we overwrite every value". You are creating a large nu= mber of tombstones, forcing many reads to pull current results. You would d= o well to rethink why you are having to to overwrite values all the time un= der the same key. You would be better to figure out haw to add values under= a key then age off the old values. I would say that (at least at scale) yo= u have a classic anti-pattern in play.


.......
=


Daemeon C.M. Reiydelle
USA (+1) 415.501.0198
Londo= n (+44) (0) 20 8144 9872


On Mon, Feb 8, 2016 at 5:23 PM, Robert Coli = <rcoli@eventbrite.com> wrote:
On Mon, Feb 8, 2016 at 2:10 PM, Agrawal, Pratik <paa= grawa@amazon.com> wrote:
Recently we added one of the table fields from as Map<text, text>= ; in Cassandra 2.1.11. Currently we read every field from Map and ov= erwrite map values. Map is of size 3. We saw that writes are 30-40% slower = while reads are 70-80% slower. Please find below some metrics that can help.=C2=A0

My question is, Are there any known issues in Cassandra map performanc= e?=C2=A0 As I understand it each of the CQL3 Map entry, maps to a column in= cassandra, with that assumption we are just creating 3 columns right? Any = insight on this issue would be helpful.

I = have previously heard reports along similar lines, but in the other directi= on.

eg - "I moved from a collection to a TEXT= column with JSON in it, and my reads and writes both became much faster!&q= uot;

I'm not sure if the issue has been raised= as an Apache Cassandra Jira, iow if it is a known and expected limitation = as opposed to just a performance issue.

If I were = you, I would consider filing a repro case as a Jira ticket, and responding = to this thread with its URL. :D

=3DRob
= =C2=A0

--001a1130d17a3ec53c052b58f6e0--