You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Nilabja Banerjee <ni...@gmail.com> on 2011/07/13 09:16:10 UTC

Key_Cache @ Row_Cache

Hi All,

Can you give me a bit idea how key_cache and row_cache effects on
performance of cassandra. How these things works in different scenario
depending upon the data size?

Thank You
Nilabja Banerjee

Re: Key_Cache @ Row_Cache

Posted by samal <sa...@wakya.in>.
>
> Can you give me a bit idea how key_cache and row_cache effects on
> performance of cassandra. How these things works in different scenario
> depending upon the data size?
>
>  While reading, if row_cached is set, it check for row_cache first then
key_cached, memtable & disk.

row_cache store all data on memory, need tuning, generally
lowered preferred
key_cache store only key and location of row in memory, higher is preferred

if row if frequently read it is good to cache it but row size matters large
row size can eat too much memory.

Also this may help
http://www.datastax.com/docs/0.8/operations/cache_tuning#configuring-key-and-row-caches

/Samal

Re:Key_Cache @ Row_Cache

Posted by 魏金仙 <se...@126.com>.
row_Cache caches a whole row, Key_cache caches the key and the row location.
thus, if the request is hit in row_Cache then the result can be given without disk seek. If it is hit in key_Cache, result can be obtains after one disk seek.
without key_Cache or row_cache, it will check the index file for the record location.


Your caching strategy should therefore be tuned in accordance with a few factors: 

• Consider your queries, and use the cache type that best fits your queries. 

• Consider the ratio of your heap size to your cache size, and do not allow the cache 

to overwhelm your heap. 

• Consider the size of your rows against the size of your keys. Typically keys will be 

much smaller than entire rows. 

If your column family gets far more reads than writes, then setting this number very high 

will needlessly consume considerable server resources. If your column family has a 

lower ratio of reads to writes, but has rows with lots of data in them (hundreds of 

columns), then you’ll need to do some math before setting this number very high. And 

unless you have certain rows that get hit a lot and others that get hit very little, you’re 

not going to see much of a boost here. 

At 2011-07-13 15:16:10,"Nilabja Banerjee" <ni...@gmail.com> wrote:
Hi All,

Can you give me a bit idea how key_cache and row_cache effects on performance of cassandra. How these things works in different scenario depending upon the data size?

Thank You
Nilabja Banerjee