incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yiming Sun <>
Subject need some help with row cache
Date Wed, 28 Nov 2012 04:16:05 GMT

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 <node>"  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,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.

View raw message