Cassandra cache key is empty

I am new to Cassandra and I am trying to optimize my reads (write times are ok, about 1000 lines per 0.1 sec) and I read key caching and Row.

Using Java with the Hector library to insert data seems to be going well, but reading is very slow (about 2-3 times slower than the SQL Server instance I'm comparing with). I started looking at the statistics cfstats show:

Key cache capacity: 200000 Key cache size: 0 Key cache hit rate: NaN Row cache capacity: 40000 Row cache size: 0 

Shouldn't there be something in the Key or Row cache after insertion? I think that’s why it works so slowly when I try to read.

Any help would be appreciated ...

+4
source share
1 answer

The key cache is used only for reading data from sstables on disk. If the data that you requested was recently inserted or updated, it will be read from memory and the key cache will not be filled.

+3
source

Source: https://habr.com/ru/post/1387237/


All Articles