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 205ECECAE for ; Wed, 28 Nov 2012 04:16:57 +0000 (UTC) Received: (qmail 79940 invoked by uid 500); 28 Nov 2012 04:16:54 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 79904 invoked by uid 500); 28 Nov 2012 04:16:53 -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 79875 invoked by uid 99); 28 Nov 2012 04:16:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 04:16:52 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yiming.sun@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 04:16:47 +0000 Received: by mail-we0-f172.google.com with SMTP id r3so4044006wey.31 for ; Tue, 27 Nov 2012 20:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=6/6Cv8VOdz+jhNQocRr+hIfBlLfu3WAHlWGSlC5Ptq8=; b=c9qzm5TF1G4WvqAXFkXVV59h+jHqZSn+LdtIubbiwRlHM8OZfH0PZu59ogGGK1ZCLQ tHdyn5vL7SEXNj56R5LddTxYRBR4XP+ZzqM7ljsml63qwJiWgBKbd8z3w9OYQVgUm97a +6izeuP01CgspembHUAIYcgbadbK3vbFpWtuxsDAN+1R6xrOmrcyZXYbc8KVLRolCbtA zo39ttknIcV6eqtD0dXTXIIsr3dJsxzMPC7a3sNLlAxP0I8Nyrd5jI/5c0PvjMbZorGF lYiPq63xZu+XmYEY2Yfx37gYr4wLw+sX2FiY9RXVtWCggZjnTAr66NIkpobGDu7Vxdqh Z/vA== Received: by 10.216.202.152 with SMTP id d24mr6796257weo.117.1354076186012; Tue, 27 Nov 2012 20:16:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.143.161 with HTTP; Tue, 27 Nov 2012 20:16:05 -0800 (PST) From: Yiming Sun Date: Tue, 27 Nov 2012 23:16:05 -0500 Message-ID: Subject: need some help with row cache To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001636c5bb5b10eb9504cf866e9e X-Virus-Checked: Checked by ClamAV on apache.org --001636c5bb5b10eb9504cf866e9e Content-Type: text/plain; charset=ISO-8859-1 Hello, I have some questions regarding Cassandra row cache and could use some help on this. On a 6-node v1.1.1 cluster, each node has key cache size in mb set to 0, and row cache size in mb to 1024, and JNA is deployed. Number of keys to cache is unlimited (empty), and row cache is not to be saved to disk. Upon starting up these servers, everything appeared to be normal: INFO 22:44:31,839 JNA mlockall successful ... INFO 22:44:32,510 Initializing key cache with capacity of 0 MBs. INFO 22:44:32,523 Scheduling key cache save to each 14400 seconds (going to save all keys). INFO 22:44:32,524 Initializing row cache with capacity of 1024 MBs and provider org.apache.cassandra.cache.SerializingCacheProvider INFO 22:44:32,528 Scheduling row cache save to each 0 seconds (going to save all keys). Then I use a client code to fetch a fixed set of 5000 entries via Hector (not the entire row, but using sliceQuery to retrieve about 50% of all columns within each row). But when I use "nodetool info -h " all nodes say the following, even after I ran the client code several times Key Cache : size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests, NaN recent hit rate, 14400 save period in seconds Row Cache : size 0 (bytes), capacity 1073741824 (bytes), 0 hits, 0 requests, NaN recent hit rate, 0 save period in seconds So it appears nothing is cached in the row cache. Is the nodetool info output wrong? I tend to think something being not configured correctly so the row cache is not working. From the Cassandra 1.1 "Caching in Cassandra" document, it also mentions a "caching = all | keys_only | rows_only | none" , "Unlike in earlier Cassandra versions, cache sizes do not need to be specified per table. Just set caching to all, keys_only, rows_only, or none, (defaulting to keys_only) and Cassandra will weight the cached data by size and access frequency, and thus make optimal use of the cache memory without manual tuning." but it is not clear to me where this setting belongs to, because even in the v1.1.6 conf/cassandra.yaml, there is no such property, and apparently adding this property to the yaml causes a fatal configuration error upon server startup, ERROR 23:13:09,425 Fatal configuration error error Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=caching for JavaBean=org.apache.cassandra.config.Config@2a8ceeea; Unable to find property 'caching' on class: org.apache.cassandra.config.Config so I am really lost and would greatly appreciate any help. Thanks. -- Y. --001636c5bb5b10eb9504cf866e9e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I have some questions regarding Cassandra row cac= he and could use some help on this.

On a 6-node v1= .1.1 cluster, =A0each node has key cache size in mb set to 0, and row cache= size in mb to 1024, and JNA is deployed. =A0Number of keys to cache is unl= imited (empty), and row cache is not to be saved to disk.

Upon starting up these servers, everything appear= ed to be normal:=A0
INFO 22:44:31,839 JNA mlockall successfu= l
...
=A0INFO 22:44:32,510 Initializing key cache with = capacity of 0 MBs.
=A0INFO 22:44:32,523 Scheduling key cache save to each 14400 sec= onds (going to save all keys).
=A0INFO 22:44:32,524 Initializing = row cache with capacity of 1024 MBs and provider org.apache.cassandra.cache= .SerializingCacheProvider
=A0INFO 22:44:32,528 Scheduling row cache save to each 0 seconds (goin= g to save all keys).

Then I use a client cod= e to fetch a fixed set of 5000 entries via Hector =A0(not the entire row, b= ut using sliceQuery to retrieve about 50% of all columns within each row).<= /div>

But when I use "nodetool info -h <node>"= ; =A0all nodes say the following, even after I ran the client code several = times

Key Cache =A0 =A0 =A0 =A0: size 0 (byte= s), capacity 0 (bytes), 0 hits, 0 requests, NaN recent hit rate, 14400 save= period in seconds
Row Cache =A0 =A0 =A0 =A0: size 0 (bytes), capacity 1073741824 (bytes)= , 0 hits, 0 requests, NaN recent hit rate, 0 save period in seconds

So it appears nothing is cached in the row cache. = =A0

Is the nodetool info output wrong? =A0I tend to think s= omething being not configured correctly so the row cache is not working. = =A0From the Cassandra 1.1 "Caching in Cassandra" document, it als= o mentions a "caching =3D all | keys_only | =A0rows_only | none" = ,=A0

"Unlike in earlier Cassandra versions, cache sizes= do not need to be specified per table. Just set caching to a= ll, keys_only, rows_only, or none, (defaulting to keys_on= ly) and Cassandra will weight the cached data by size and access frequency, and thus make optimal use of the cache memory without manual tuning."=

but it is not clear to me where this setting belo= ngs to, because even in the v1.1.6 conf/cassandra.yaml, =A0there is no such= property, and apparently adding this property to the yaml causes a fatal c= onfiguration error upon server startup,=A0

ERROR 23:13:09,425 Fatal configuration error error=
Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=3DCan= not create property=3Dcaching for JavaBean=3Dorg.apache.cassandra.config.Co= nfig@2a8ceeea; Unable to find property 'caching' on class: org.apac= he.cassandra.config.Config


so I am really lost and would grea= tly appreciate any help. =A0Thanks.

-- Y.

--001636c5bb5b10eb9504cf866e9e--