nodetool setcachekeystosave
Sets the global number of keys saved by each cache for faster post-restart warmup.
|
Overrides the configured value of the |
|
To change the current setting, use |
Synopsis
nodetool [<connection_options>] setcachekeystosave
<key-cache-keys-to-save> <row-cache-keys-to-save> <counter-cache-keys-to-save>
Definition
The short- and long-form options are comma-separated.
Connection options
- -h, --host hostname
-
The hostname or IP address of a remote node or nodes. When omitted, the default is the local machine.
- -p, --port jmx_port
-
The JMX port number.
- -pw, --password jmxpassword
-
The JMX password for authenticating with secure JMX. If a password is not provided, you are prompted to enter one.
- -pwf, --password-file
-
The file path to the file that stores JMX authentication credentials.
- -u, --username jmx_username
-
The username for authenticating with secure JMX.
Command arguments
- counter-cache-keys-to-save
-
The number of keys from the counter cache to save at the interval defined by
counter_cache_save_period.-
Number greater than 0: Save that many keys.
-
0 (default): Save all keys.
-
- key-cache-keys-to-save
-
Corresponds to the
key_cache_keys_to_saveparameter in thecassandra.yamlfile. Only relevant when using thebigSSTable format; has no effect with the defaultbtiformat.-
Number greater than 0: Save that many keys.
-
0 (default): Save all keys.
-
- row-cache-keys-to-save
-
Corresponds to the
row_cache_keys_to_saveparameter incassandra.yaml.-
Number greater than 0: Save that many keys.
-
0 (default): Save all keys.
-
Examples
-
Set the global number of keys to 2147483647, row cache to 1073741824, and counter cache to 2147483647:
nodetool setcachekeystosave 2147483647 1073741824 2147483647 -
Ensure cache keys to save were updated:
nodetool getcachekeystosaveKey cache keys to save: 2147483647 Row cache keys to save: 1073741824 Counter cache keys to save: 2147483647