Configuring data caches
Information about partition key cache, row cache, and row-level permission cache in DataStax Enterprise.
DataStax Enterprise includes integrated caching and distributes cache data around the cluster.
When a node goes down, the client can read from another cached replica of the data. The database architecture also facilitates troubleshooting because there is no separate caching tier, and cached data matches what is in the database exactly. The integrated cache alleviates the cold start problem by saving the cache to disk periodically. The database reads contents back into the cache and distributes the data when it restarts. The cluster does not start with a cold cache.
The saved key cache files include the ID of the table in the file name.
A saved key cache filename for the
users table in the
mykeyspace keyspace looks similar to:
Utilizing appropriate OS page cache results in better performance than using row caching. Consult resources for page caching for the operating system on which DataStax Enterprise is hosted.
Configure the number of rows to cache in a partition by setting the rows_per_partition table option. To cache rows, if the row key is not already in the cache, the database reads the first portion of the partition, and puts the data in the cache. If the newly cached data does not include all cells configured by user, the database performs another read. The actual size of the row-cache depends on the workload. You should properly benchmark your application to get `"the best`" row cache size to configure.
There are two row cache options, the old serializing cache provider and a new off-heap cache (OHC) provider. The new OHC provider has been benchmarked as performing about 15% better than the older option.
Enable a row cache only when the number of reads is much bigger (rule of thumb is 95%) than the number of writes.
Disable caching entirely for archive tables, which are infrequently read.