nodetool cfstats
Provides statistics about tables.
Provides statistics about tables.
Synopsis
nodetool <options> cfstats -i -- <keyspace>.<table> ... -H
Short | Long | Description |
---|---|---|
-h |
--host |
Hostname or IP address |
-p |
--port |
Port number |
-pwf |
--password-file |
Password file path |
-pw |
--password |
Password |
-u |
--username |
User name |
-- |
Separates an option from an argument that could be mistaken for a option. |
- i ignores the following tables, providing only information about other Cassandra tables
- keyspace.table is one or more keyspace and table names in dot notation.
- H converts bytes to a human readable form: kilobytes (KB), megabytes (MB), gigabytes (GB), or terabytes (TB). (Cassandra 2.1.1)
Description
The nodetool cfstats command provides statistics about one or more tables. It's updated when SSTables change through compaction or flushing.
Use dot notation to specify one or more keyspace and table names. If you do not specify a
keyspace and table, Cassandra provides statistics about all tables. If you use the
-i
option, Cassandra provides statistics about all tables except the
given ones. The use of the metrics-core library in Cassandra 2.1 makes the output more
informative and easier to understand.
Name of statistic | Example value | Brief description | Related information |
---|---|---|---|
Keyspace | libdata | Name of the keyspace | Keyspace and table |
Read count | 11207 | Number of requests to read tables in the libdata keyspace since startup | |
Read latency | 0.047. . . ms | Latency reading the tables in the libdata keyspace | |
Write count | 17598 | Number of requests to update tables in the libdata keyspace since startup | |
Write latency | 0.053. . . ms | Latency writing tables in the libdata keyspace | |
Pending tasks | 0 | Tasks in the queue for reads, writes, and cluster operations of tables in the keyspace | |
Table | libout | Name of the Cassandra table | |
SSTable count | 3 | Number of SSTable containing data from the table | |
Space used (live), bytes: | 9592399 | Space used by the table (depends on operating system) | |
Space used (total), bytes: | 9592399 | Same as above | Same as above |
Space used by snapshots (total), bytes: | 0 | Same occupied by backup data | |
SSTable compression ratio | 0.367. . . | Fraction of data-representation size resulting from compression | Types of compression option) |
Memtable cell count | 1022550 | Number of cells (storage engine rows x columns) of data in the memtable | Cassandra memtable structure in memory |
Memtable data size, bytes | 32028148 | Size of the memtable data | Same as above |
Memtable switch count | 3 | Number of times a full memtable was swapped for an empty one (Increases each time the memtable for a table is flushed to disk) | How memtables are measured article |
Local read count | 11207 | Number of local read requests for the libout table since startup | |
Local read latency | 0.048 ms | Round trip time in milliseconds to complete a request to read the libout table | Factors that affect read latency |
Local write count | 17598 | Number of local requests to update the libout the table since startup | |
Local write latency | 0.054 ms | Round trip time in milliseconds to complete an update to the libout table | Factors that affect write latency |
Pending tasks | 0 | Number of read, write, and cluster operations that are pending | |
Bloom filter false positives | 0 | Number of false positives, which occur when the bloom filter said the row existed, but it actually did not exist in absolute numbers | Tuning bloom filters |
Bloom filter false ratio | 0.00000 | Fraction of all bloom filter checks resulting in a false positive | Same as above |
Bloom filter space used, bytes | 11688 | Size of bytes of the bloom filter data | Same as above |
Compacted partition minimum bytes | 1110 | Lower size limit for the partition being compacted in memory | Used to calculate what the approximate row cache size should be. Multiply the reported row cache size, which is the number of rows in the cache, by the compacted row mean size for every table and sum them. |
Compacted partition maximum bytes | 126934 | Upper size limit for compacted table rows. | Configurable in the cassandra.yaml in_memory_compaction _limit_in_mb |
Compacted partition mean bytes | 2730 | The average size of compacted table rows | |
Average live cells per slice (last five minutes) | 0.0 | Average of cells scanned by single key queries during the last five minutes | |
Average tombstones per slice (last five minutes) | 0.0 | Average of tombstones scanned by single key queries during the last five minutes |
Examples
This example shows an excerpt of the output of the command after flushing a table of library data to disk.
nodetool cfstats libdata.libout Keyspace: libdata Read Count: 11207 Read Latency: 0.047931114482020164 ms. Write Count: 17598 Write Latency: 0.053502954881236506 ms. Pending Flushes: 0 Table: libout SSTable count: 3 Space used (live), bytes: 9088955 Space used (total), bytes: 9088955 Space used by snapshots (total), bytes: 0 SSTable Compression Ratio: 0.36751363892150946 Memtable cell count: 0 Memtable data size, bytes: 0 Memtable switch count: 3 Local read count: 11207 Local read latency: 0.048 ms Local write count: 17598 Local write latency: 0.054 ms Pending flushes: 0 Bloom filter false positives: 0 Bloom filter false ratio: 0.00000 Bloom filter space used, bytes: 11688 Compacted partition minimum bytes: 1110 Compacted partition maximum bytes: 126934 Compacted partition mean bytes: 2730 Average live cells per slice (last five minutes): 0.0 Average tombstones per slice (last five minutes): 0.0
Using the human-readable option
Using the human-readable -H option provides output in easier-to-read units than bytes. For example:
nodetool cfstats demodb.nhanes -H Keyspace: demodb Read Count: 0 Read Latency: NaN ms. Write Count: 20050 Write Latency: 0.08548014962593516 ms. Pending Flushes: 0 Table: nhanes SSTable count: 1 Space used (live): 13.75 MB Space used (total): 13.75 MB Space used by snapshots (total): 0 bytes SSTable Compression Ratio: 0.3064650643762481 Memtable cell count: 0 Memtable data size: 0 bytes Memtable switch count: 1 Local read count: 0 Local read latency: NaN ms Local write count: 20050 Local write latency: 0.085 ms Pending flushes: 0 Bloom filter false positives: 0 Bloom filter false ratio: 0.00000 Bloom filter space used: 23.73 KB Compacted partition minimum bytes: 1.87 KB Compacted partition maximum bytes: 2.69 KB Compacted partition mean bytes: 2.26 KB Average live cells per slice (last five minutes): 0.0 Maximum live cells per slice (last five minutes): 0.0 Average tombstones per slice (last five minutes): 0.0 Maximum tombstones per slice (last five minutes): 0.0 ----------------
Package installations | /etc/cassandra/cassandra.yaml |
Tarball installations | install_location/resources/cassandra/conf/cassandra.yaml |