Key Cassandra metrics
By monitoring Cassandra performance, you can identify bottlenecks, slowdowns, or resource limitations and address them in a timely manner.
When inspecting Cassandra nodes for performance issues, the following metrics are the most helpful in determining the root cause:
- The count of errors and warnings in the logs.
- The indication of free disk space and Garbage Collection metrics.
- Such CPU metrics as
- Such disk metrics as disk queue length and throughput.
- Such network metrics as latency.
Monitor the following Cassandra metrics for troubleshooting and fault prevention:
||Less than 30|
||Less than 10MB||The
||This setting provides details for dropped mutations or messages that were not saved to disk yet but are stored in memory.||50 mutations or messages. If the data is prevented from being
saved after the
|Node status||Run the
|Compaction rate||Saves the data from memtable to sstables. The default value is 16 MB/sec|
The following is a list of the most useful Cassandra commands that are helpful in maintaining the good health of the cluster:
- nodetool flush
- Writes data from memtables to SSTables in the file system. Run this
command if the
nodetool tpstatscommand returned a high count of thread pools.
- nodetool cleanup
- Removes unwanted data, that is, the data that us no longer owned by node. Run this command after a new node joins the cluster and after data redistribution.
- nodetool repair
- Repairs one or more nodes in a cluster and provides options for
restricting repair to a set of nodes. The following additional repair
modes are available with the
incremental– Separates fixed data from to be fixed data. Examines all sstables but repairs only damaged ones.
full– Examines and repairs all sstables. Irrespective of an SSTable being damaged or not.
seq– Sequential repair. Puts less load on the cluster during repair and takes more time.
par– Parallel repair. Puts more load on the cluster during repair and takes less time.
- nodetool bootstrap
- Checks the status of addition of a new node to the cluster. Run the
nodetool cleanupon each of already existing nodes to remove unwanted data in them. Also in
cassandra.yamlfile, set the
autobootstrapsetting to false to prevent automatic token transfer as soon as you add a node. To start the transfer manually, run the
nodetool bootstrap resumecommand.