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?