incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Capriolo <edlinuxg...@gmail.com>
Subject Re: cache sizes using percentages
Date Tue, 17 Aug 2010 19:07:37 GMT
On Tue, Aug 17, 2010 at 1:55 PM, Artie Copeland <yeslinux.now@gmail.com> wrote:
> if i set a key cache size of 100% the way i understand how that works is:
> - the cache is not write through, but read through
> - a key gets added to the cache on the first read if not already available
> - the size of the cache will always increase for ever item read.  so if you
> have 100mil items your key cache will grow to 100mil
> Here are my questions:
> if that is the case then what happens if you only have enough mem to store
> 10mil items in your key cache?
> do you lose the other 90% how is it determined what is removed?
> will the server keep adding til it gets OOM?
> if you add a row cache as well how does that affect your percentage?
> if there a priority between the cache? or are they independant so both will
> try to be satisfied which would result in an OOM?
> thanx,
> artie
> --
> http://yeslinux.org
> http://yestech.org
>

Artie,

In my experience, what ends up happening.. You start your server and
all is well, your cache builds up, cache hit rate keeps climbing! Of
course so does memory usage. At some point you start reaching your
XMX. Java keeps trying to garbage collect often. A couple things can
happen, all of them bad. One is just hitting an OOM. Another thing
that can happen is the JVM spends too much time garbage collection and
so little time processing its throws another exception (might be a
subtype of OOM).

 do you lose the other 90% how is it determined what is removed?
Items are removed when full is reached actual memory usage is NOT
taken into account.

if you add a row cache as well how does that affect your percentage?
Mutually exclusive.

> if there a priority between the cache?
No

Mime
View raw message