nodetool setcachecapacity

Set global key and row cache capacities in megabytes.

Set global key and row cache capacities in megabytes.

Synopsis

nodetool <options> setcachecapacity -- <key-cache-capacity> <row-cache-capacity>
Cassandra tarball installations:
installation_location/cassandra/bin
Table 1. Options
Short Long Description
-h --host Hostname or IP address.
-p --port Port number.
-pwf --password-file Password file path.
-pw --password Password.
-u --username Remote JMX agent username.
key-cache-capacity Maximum size in MB of the key cache in memory.
row-cache-capacity Maximum size in MB of the row cache in memory.
counter-cache-capacity Maximum size in MB of the counter cache in memory.
-- Separates an option from an argument that could be mistaken for a option.

Description

The key-cache-capacity argument corresponds to the key_cache_size_in_mb parameter in the cassandra.yaml. Each key cache hit saves one seek and each row cache hit saves a minimum of two seeks. Devoting some memory to the key cache is usually a good tradeoff considering the positive effect on the response time. The default value is empty, which means a minimum of five percent of the heap in MB or 100 MB.

The row-cache-capacity argument corresponds to the row_cache_size_in_mb parameter in the cassandra.yaml. By default, row caching is zero (disabled).

The counter-cache-capacity argument corresponds to the counter_cache_size_in_mb in the cassandra.yaml. By default, counter caching is a minimum of 2.5% of Heap or 50MB.

The location of the cassandra.yaml file depends on the type of installation:
Cassandra package installations /etc/cassandra/cassandra.yaml
Cassandra tarball installations install_location/cassandra/conf/cassandra.yaml