cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 魏金仙 <sei_...@126.com>
Subject Re:Key_Cache @ Row_Cache
Date Wed, 13 Jul 2011 07:39:05 GMT
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" <nilabja.banerjee@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
Mime
View raw message