cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <>
Subject Re: Losing key cache on restart
Date Tue, 24 Apr 2012 23:36:35 GMT
> - Cassandra log reports 12,955,585 of them have been saved on the last save events.
Has their been much activity between saves ?

Nothing jumps out. There is a setting for the max entries to store, but this only applies
to the row cache. Can you reproduce issue in a dev environment ?

When running the key cache holds keys of the form <SSTable, DecoratedKey> so there is
an entry for each SSTable the key appears in. When saved only the DecoratedKey's are stored,
and the key cache is rebuilt on startup when iterating over the index files. e.g. ig you have
12 entries in the keycache, it may only be 4 unique keys and that is all that is written when
saving the cache.  

From a quick look at the code it looks like the code is writing all DecoratedKeys , not just
the unique ones. This may be mucking up the reported numbers, I'll take a look later.

If you can reproduce it simply it would help. 


Aaron Morton
Freelance Developer

On 25/04/2012, at 1:11 AM, Omid Aladini wrote:

> Hi,
> I'm experiencing losing a part of key cache on restart on Cassandra 1.0.7. For example:
> - cfstats reports key cache size of 13,040,502 with capacity of 15,000,000.
> - Cassandra log reports 12,955,585 of them have been saved on the last save events.
> - On restart Cassandra reads saved cache.
> - cfstats reports key cache size of only 2,833,586 with correct capacity of 15,000,000.
> There is no sign that the cache size is reduced due to memory pressure. The key cache
capacity is set manually via cassandra-cli. 
> Has anyone else encountered this problem or is it a known issue?
> Thanks,
> Omid

View raw message