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 8014D23ED for ; Sun, 1 May 2011 18:59:27 +0000 (UTC) Received: (qmail 33677 invoked by uid 500); 1 May 2011 18:59:25 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 33651 invoked by uid 500); 1 May 2011 18:59:25 -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 33643 invoked by uid 99); 1 May 2011 18:59:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 May 2011 18:59:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shimi.k@gmail.com designates 209.85.210.44 as permitted sender) Received: from [209.85.210.44] (HELO mail-pz0-f44.google.com) (209.85.210.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 May 2011 18:59:19 +0000 Received: by pzk5 with SMTP id 5so3480227pzk.31 for ; Sun, 01 May 2011 11:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=I5H/I+Pa24LO8tZc31H4R0cVZ+HYPkV7m5idxv2tvL4=; b=ZU8fkZ+QR8na58kjXoypV3ZbpOVl9dfUrWUja23g3H2Fcb9DlMmuSynMtbBDTTuWRC WqrYla1sJqTMBHGZrZHGxzgfJDAvmlLZpBDofRMmWwnL3ZkauY9NEXni9oa7hr2qHzfH 1mduiZjdahCruu/ULoWqv/GRqtR9u8Ca8p/dc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=txuR0YKyup6w7T6bLwW/Vq5ghOpmlPLj31W2H3Lcp3f5Y4ssnfNbRR+Nmuesn5CuxS GcmECmQ0oFyjP7UR3xYfgUn9O753UWtyBNqq4QTRMFoqBBE8yL92enptxkJXKSCuZ9Er a/iTely+XvIZ0gO0BUns0hP/476rHngtY+uGM= MIME-Version: 1.0 Received: by 10.143.3.8 with SMTP id f8mr2735382wfi.39.1304276337053; Sun, 01 May 2011 11:58:57 -0700 (PDT) Received: by 10.143.159.13 with HTTP; Sun, 1 May 2011 11:58:57 -0700 (PDT) In-Reply-To: References: Date: Sun, 1 May 2011 21:58:57 +0300 Message-ID: Subject: Re: Combining all CFs into one big one From: shimi To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001636e909e3c24f0c04a23b7f52 X-Virus-Checked: Checked by ClamAV on apache.org --001636e909e3c24f0c04a23b7f52 Content-Type: text/plain; charset=ISO-8859-1 On Sun, May 1, 2011 at 9:48 PM, Jake Luciani wrote: > If you have N column families you need N * memtable size of RAM to support > this. If that's not an option you can merge them into one as you suggest > but then you will have much larger SSTables, slower compactions, etc. > I don't necessarily agree with Tyler that the OS cache will be less > effective... But I do agree that if the sizes of sstables are too large for > you then more hardware is the solution... If you merge CFs which are hardly accessed with one which are accessed frequently, when you read the SSTable you load data that is hardly accessed to the OS cache. Another thing which you should be aware is that if you need to run any of the nodetool cf tasks, and you really need it for a specific CF running it on the specific CF is better and faster. Shimi > > > On Sun, May 1, 2011 at 1:24 PM, Tyler Hobbs wrote: > >> When you have a high number of CFs, it's a good idea to consider merging >> CFs with highly correlated access patterns and similar structure into one. >> It is *not* a good idea to merge all of your CFs into one (unless they all >> happen to meet this criteria). Here's why: >> >> Besides big compactions and long repairs that you can't break down into >> smaller pieces, the main problem here is that your caching will become much >> less efficient. The OS buffer cache will be less effective because rows from >> all of the CFs will be interspersed in the SSTables. You will no longer be >> able to tune the key or row cache to only cache frequently accessed data. >> Both of these will tend to cause a serious increase in latency for your hot >> data. >> >>> Shouldn't these kinds of problems be solved by Cassandra? >>> >> They are mainly solved by Cassandra's general solution to any performance >> problem: the addition of more nodes. There are tickets open to improve >> compaction strategies, put bounds on SSTable sizes, etc; for example, >> https://issues.apache.org/jira/browse/CASSANDRA-1608 , but the addition >> of more nodes is a reliable solution to problems of this nature. >> >> On Sun, May 1, 2011 at 7:28 AM, David Boxenhorn wrote: >> >>> Shouldn't these kinds of problems be solved by Cassandra? Isn't there a >>> maximum SSTable size? >>> >>> On Sun, May 1, 2011 at 3:24 PM, shimi wrote: >>> >>>> Big sstables, long compactions, in major compaction you will need to >>>> have free disk space in the size of all the sstables (which you should have >>>> anyway). >>>> >>>> Shimi >>>> >>>> >>>> On Sun, May 1, 2011 at 2:03 PM, David Boxenhorn wrote: >>>> >>>>> I'm having problems administering my cluster because I have too many >>>>> CFs (~40). >>>>> >>>>> I'm thinking of combining them all into one big CF. I would prefix the >>>>> current CF name to the keys, repeat the CF name in a column, and index the >>>>> column (so I can loop over all rows, which I have to do sometimes, for some >>>>> CFs). >>>>> >>>>> Can anyone think of any disadvantages to this approach? >>>>> >>>>> >>>> >>> >> >> >> -- >> Tyler Hobbs >> Software Engineer, DataStax >> Maintainer of the pycassa Cassandra >> Python client library >> >> > > > -- > http://twitter.com/tjake > --001636e909e3c24f0c04a23b7f52 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Sun, May 1, 2011 at 9:4= 8 PM, Jake Luciani <jakers@gmail.com> wrote:
If you have N column families you need N * memtable size of RAM to support = this. =A0If that's not an option you can merge them into one as you sug= gest but then you will have much larger SSTables, slower compactions, etc. =
=A0
I don't=A0necessarily=A0a= gree with Tyler that the OS cache will be less effective... But I do agree = that if the sizes of sstables are too large for you then more hardware is t= he solution...

If you merge CFs which are hardly accessed with one which are = accessed frequently, when you read the SSTable you load data that is hardly= accessed to the OS cache.

Another thi= ng which you should be aware is that if you need to run any of the nodetool= cf tasks, and you really need it for a specific CF running it on the speci= fic CF is better and faster.=A0

Shimi
=A0


On Sun, May 1, 2011 at 1:24 PM, Tyler Hobbs = <tyler@datastax.com> wrote:
When you have a high number of CFs,=20 it's a good idea to consider merging CFs with highly correlated access= =20 patterns and similar structure into one. It is *not* a good idea to=20 merge all of your CFs into one (unless they all happen to meet this=20 criteria). Here's why:

Besides big compactions and long repairs that you can't break down= =20 into smaller pieces, the main problem here is that your caching will=20 become much less efficient. The OS buffer cache will be less effective=20 because rows from all of the CFs will be interspersed in the SSTables. =20 You will no longer be able to tune the key or row cache to only cache=20 frequently accessed data. Both of these will tend to cause a serious=20 increase in latency for your hot data.

Shouldn't these = kinds of problems be solved by=20 Cassandra?

They are mainly solved by Cassandra&#= 39;s general solution to=20 any performance problem: the addition of more nodes. There are tickets=20 open to improve compaction strategies, put bounds on SSTable sizes, etc; for example, https://issues.apache.org/jira/browse/CASSANDRA-1608<= /a> , but the addition of more nodes is a reliable solution to problems of = this nature.

On Sun, May 1, 20= 11 at 7:28 AM, David Boxenhorn <david@taotown.com> wrote:
Shouldn't these kinds of problems be solved by Cassand= ra? Isn't there a maximum SSTable size?

On Sun, May 1, 2011 at 3:24 PM, shimi <shimi.k@gm= ail.com> wrote:
Big ss= tables, long compactions, in major compaction you will need to have free di= sk space in the size of all the sstables (which you should have anyway).
Shimi

On Sun, May 1, 2011 at 2:03 PM, David Boxenhorn <david@taotown.com>= wrote:
I'm having problems administering my cluster because I= have too many CFs (~40).

I'm thinking of combining them all int= o one big CF. I would prefix the current CF name to the keys, repeat the CF= name in a column, and index the column (so I can loop over all rows, which= I have to do sometimes, for some CFs).

Can anyone think of any disadvantages to this approach?






--
Tyler Hobbs
Software Engineer, DataS= tax
Maintainer of the pycassa Cassandra Python client library



--
= http://twitter.com/tjake

--001636e909e3c24f0c04a23b7f52--