Monitoring and adjusting caching

Improve performance by adjusting the cache.

cassandra.yaml

The location of the cassandra.yaml file depends on the type of installation:
Package installations /etc/dse/cassandra/cassandra.yaml
Tarball installations installation_location/resources/cassandra/conf/cassandra.yaml

In the event of high memory consumption, consider tuning data caches.

Make changes to cache options in small, incremental adjustments, then monitor the effects of each change using nodetool info.

The cassandra.yaml file provides options for adjusting row cache and key cache settings:
  • Cache size in bytes
  • Capacity in bytes
  • Number of hits
  • Number of requests
  • Recent hit rate
  • Duration in seconds after which the database saves the key cache.

For example, on start-up, the information from nodetool info might look something like this:

ID               : 387d15ba-7103-491b-9327-1a691dbb504a
Gossip active    : true
Thrift active    : true
Native Transport active: true
Load             : 65.87 KB
Generation No    : 1400189757
Uptime (seconds) : 148760
Heap Memory (MB) : 392.82 / 1996.81
datacenter      : datacenter1
Rack             : rack1
Exceptions       : 0
Key Cache        : entries 10, size 728 (bytes), capacity 103809024 (bytes), 93 hits, 102 requests, 0.912 recent hit rate, 14400 save period in seconds
Row Cache        : entries 0, size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests, NaN recent hit rate, 0 save period in seconds
Counter Cache    : entries 0, size 0 (bytes), capacity 51380224 (bytes), 0 hits, 0 requests, NaN recent hit rate, 7200 save period in seconds
Token            : -9223372036854775808