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 B05E210954 for ; Sun, 1 Jun 2014 19:49:49 +0000 (UTC) Received: (qmail 14526 invoked by uid 500); 1 Jun 2014 19:49:47 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 14488 invoked by uid 500); 1 Jun 2014 19:49:47 -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 14480 invoked by uid 99); 1 Jun 2014 19:49:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jun 2014 19:49:47 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of burtonator2011@gmail.com designates 209.85.217.177 as permitted sender) Received: from [209.85.217.177] (HELO mail-lb0-f177.google.com) (209.85.217.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jun 2014 19:49:43 +0000 Received: by mail-lb0-f177.google.com with SMTP id s7so2008425lbd.22 for ; Sun, 01 Jun 2014 12:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=G/tthm5gPMBlCCzsM3M9z4wZDicrN0EKd+VqkFe55H8=; b=uYAADbsKYPbkWNqM3sLLKTiJTEw/WvbJisF51RWszyDi6BTip3EVOQJV6+6ePfvbAz cipwp/bCMuzhiv1jcMWbQMMYiA4KlEsgXvCNLLMjU/ACBA1Qw3jWtAMopTwI3ghG5sjG uYUUXn8WTmSzz9ThzHFSkHeyGkQCycL7/VfGHMnN5Ved54LkfMRmcbRAGTqI6lY+LXXO 3xmjEdVfmPOeUEVPAaZPj//7j35HoxFIiS3qRF82wQGCpi6LMLxA+fpbPqtd4wDQAXn2 z6OTJn8PkidhEbZkH2/rPM30MlqXoTWVfAnr78Ukfi7pcVsNr5At7WmRqmkP5Wc1tQfr 9m1Q== X-Received: by 10.112.118.197 with SMTP id ko5mr23638700lbb.23.1401652161863; Sun, 01 Jun 2014 12:49:21 -0700 (PDT) MIME-Version: 1.0 Sender: burtonator2011@gmail.com Received: by 10.112.219.231 with HTTP; Sun, 1 Jun 2014 12:49:01 -0700 (PDT) From: Kevin Burton Date: Sun, 1 Jun 2014 12:49:01 -0700 X-Google-Sender-Auth: uXlcbxhL1H_Bu3c5kgZEDEb3iQM Message-ID: Subject: Tune cache MB settings per table. To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7bfd05a234e6d204facb93c9 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bfd05a234e6d204facb93c9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable It's possible to set caching to: all, keys_only, rows_only, or none .. for a given table. But we have one table which is MASSIVE and we only need the most recent 4-8 hours in memory. Anything older than that can go to disk as the queries there are very rare. =E2=80=A6 but I don't think cassandra can do this (which is a shame). Another option is to partition our tables per hour=E2=80=A6 then tell the o= lder tables to cache 'none'=E2=80=A6 I hate this option though. A smarter mechanism would be to have a compaction strategy that created an SSTable for every hour and then had custom caching settings for that table. The additional upside for this is that TTLs would just drop the older data in the compactor.. --=20 Founder/CEO Spinn3r.com Location: *San Francisco, CA* Skype: *burtonator* blog: http://burtonator.wordpress.com =E2=80=A6 or check out my Google+ profile War is peace. Freedom is slavery. Ignorance is strength. Corporations are people. --047d7bfd05a234e6d204facb93c9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It's possible to set caching to:

<= div>= all, keys_only, rows_only<= span style=3D"color:rgb(75,75,75);font-style:normal;font-variant:normal;fon= t-weight:normal;letter-spacing:normal;line-height:15.163007736206055px;text= -align:start;text-indent:0px;text-transform:none;white-space:normal;word-sp= acing:0px;display:inline!important;float:none;background-color:rgb(255,255,= 255)">, or=C2=A0none

.. for a g= iven table.

But we have one table which is MASSIVE and we= only need the most recent 4-8 hours in memory. =C2=A0=

Anything older than that can go to disk as th= e queries there are very rare.

=E2=80=A6 but I don't think ca= ssandra can do this (which is a shame).

Another op= tion is to partition our tables per hour=E2=80=A6 then tell the older table= s to cache 'none'=E2=80=A6=C2=A0

I hate this option though. =C2=A0A smarter mechanism wo= uld be to have a compaction strategy that created an SSTable for every hour= and then had custom caching settings for that table.

<= div> The additional upside for this is that TTLs would just drop the older data = in the compactor..=C2=A0

--

Founder/CEO=C2=A0Spinn3r.= com
Location:=C2=A0San Francisco, CA
Skype:=C2=A0burton= ator
=E2=80=A6 or check out my Google+ profile
War is peace. Fre= edom is slavery. Ignorance is strength. Corporations are people.

--047d7bfd05a234e6d204facb93c9--