so the row cache contains both rows and keys and if I have large enough row
cache (in particular if row cache size equals key cache size) then it's just
wasteful to keep another key cache and I should eliminate the key-cache,
correct?

On Thu, May 27, 2010 at 1:21 AM, Jonathan Ellis <jbel...@gmail.com> wrote:

> It sure sounds like you're seeing the "my row cache contains the
> entire hot data set, so the key cache only gets the cold reads"
> effect.
>
> On Wed, May 26, 2010 at 2:54 PM, Ran Tavory <ran...@gmail.com> wrote:
> > If I disable row cache the numbers look good - key cache hit rate is > 0,
> so
> > it seems to be related to row cache.
> > Interestingly, after running for a really long time and with both row and
> > keys caches I do start to see Key cache hit rate > 0 but the numbers are
> so
> > small that it doesn't make sense.
> > I have capacity for 10M keys and 10M rows, the number of cached keys is
> ~5M
> > and very similarly the number of cached rows is also ~5M, however the hit
> > rates are very different, 0.7 for rows and 0.006 for keys. I'd expect the
> > keys hit rate to be identical since none of them reached the limit yet.
> >                 Key cache capacity: 10000000
> >                 Key cache size: 5044097
> >                 Key cache hit rate: 0.0062089764058896576
> >                 Row cache capacity: 10000000
> >                 Row cache size: 5057231
> >                 Row cache hit rate: 0.7361241352465543
> >
> >
> > On Tue, May 25, 2010 at 3:43 PM, Jonathan Ellis <jbel...@gmail.com>
> wrote:
> >>
> >> What happens if you disable row cache?
> >>
> >> On Tue, May 25, 2010 at 4:53 AM, Ran Tavory <ran...@gmail.com> wrote:
> >> > It seems there's an error reporting the Key cache hit rate. The value
> is
> >> > always 0.0 and I have a feeling it's incorrect. This is seen both by
> >> > using
> >> > notetool cfstats as well as accessing JMX directly
> >> >
> >> >
> (org.apache.cassandra.db:type=Caches,keyspace=outbrain_kvdb,cache=KvAdsKeyCache
> >> > RecentHitRate)
> >> >       <ColumnFamily CompareWith="BytesType" Name="KvAds"
> >> >                     RowsCached="10000000"
> >> >                     KeysCached="10000000"/>
> >> >                 Column Family: KvAds
> >> >                 SSTable count: 7
> >> >                 Space used (live): 1288942061
> >> >                 Space used (total): 1559831566
> >> >                 Memtable Columns Count: 73698
> >> >                 Memtable Data Size: 17121092
> >> >                 Memtable Switch Count: 33
> >> >                 Read Count: 3614433
> >> >                 Read Latency: 0.068 ms.
> >> >                 Write Count: 3503269
> >> >                 Write Latency: 0.024 ms.
> >> >                 Pending Tasks: 0
> >> >                 Key cache capacity: 10000000
> >> >                 Key cache size: 619624
> >> >                 Key cache hit rate: 0.0
> >> >                 Row cache capacity: 10000000
> >> >                 Row cache size: 447154
> >> >                 Row cache hit rate: 0.8460295730014572
> >> >                 Compacted row minimum size: 387
> >> >                 Compacted row maximum size: 31430
> >> >                 Compacted row mean size: 631
> >> > The Row cache hit rate looks good, 0.8 but Key cache hit rate always
> >> > seems
> >> > to be 0.0 while the number of unique keys stays about 619624 for quite
> a
> >> > while.
> >> > Is it a real caching problem or just a reporting glitch?
> >>
> >>
> >>
> >> --
> >> Jonathan Ellis
> >> Project Chair, Apache Cassandra
> >> co-founder of Riptano, the source for professional Cassandra support
> >> http://riptano.com
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

Reply via email to