Difference between Cassandra Row caching and section key caching

What is the difference between a line cache and a section cache? should I use both for a good Vista perspective.

I already read the basic definition from dataStax

The partition key key is the partition index cache for the Cassandra Desk. Using the key cache instead of relying on the OS page, the cache saves processor time and memory. However, including only the key cache leads to activity on the disk (or OS cache page) for actually reading the requested data rows.

The line cache is similar to a traditional cache such as memcached. When a line is available, the entire line is pulled into memory, merging with several SSTables, if necessary, and cached, so that you can read against this line further without a disk hit at all.

Can anyone develop a use area. you need to both implement both.

+6
source share
1 answer

TL DR: you want to use Key Cache and most likely DO NOT want a line cache.

The cache cache helps C * know where a particular section begins in SStables. This means that C * does not have to read anything in order to determine a suitable place to search in a file in order to start reading a line. This is useful for almost all use cases, as it speeds up reading, greatly reducing the need for IOPs in the read path.

Row Cache has a much more limited use case. The line cache pulls entire sections into memory. If any part of this section has been modified, the entire cache for this line is invalid. For large partitions, this means that the cache can often be cached and invalidate large chunks of memory. Since you really need mostly static partitions for this to be useful, it is recommended that you not use Row Cache for most use cases.

+6
source

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


All Articles