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>
  • Options are:
    • ( -h | --host ) <host name> | <ip address>
    • ( -p | --port ) <port number>
    • ( -pw | --password ) <password >
    • ( -u | --username ) <user name>
    • ( -pwf <passwordFilePath | --password-file <passwordFilePath> )
  • -- separates an option and argument that could be mistaken for a option.
  • key-cache-capacity is the maximum size in MB of the key cache in memory.
  • row-cache-capacity corresponds to the maximum size in MB of the row cache in memory.
  • counter-cache-capacity corresponds to the maximum size in MB of the counter cache in memory.

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:
Package installations /etc/cassandra/cassandra.yaml
Tarball installations install_location/resources/cassandra/conf/cassandra.yaml