nodetool tablestats

Provides statistics about tables.

Provides statistics about tables.

Synopsis

nodetool <options> tablestats -i -- (<keyspace>.<table> ... ) -H 
  • -- separates an option from an argument that could be mistaken for a option.
  • -i excludes the following list of tables from the tool's report. tablestat reports on all other tables in all other keyspaces.
  • table specifies the table that the tool reports on. Use keyspace and a dot to specify the table's keyspace. to get stats on two or more tables, add more names (with optional keyspace names) separated by spaces.

    If you run the command with no table names, nodetool tablestats reports on all tables in all keyspaces.

  • -H converts bytes to a human readable form: kilobytes (KB), megabytes (MB), gigabytes (GB), or terabytes (TB).

Description

The nodetool tablestats command provides statistics about one or more tables. Cssandra uses the metrics-core library to make the output more informative and easier to understand.

This table lists the components of the nodetool tablestats output for a single table.
Table 1. nodetool tablestats output
Name of statistic Example value Brief description Related information
Keyspace libdata Name of the keyspace Keyspace and table
Table libout Name of this table
SSTable count 3 Number of SSTables containing data for this table How to use the SSTable counts metric
Space used (live) 9592399 Total number of bytes of disk space used by all active SSTables belonging to this table Storing data on disk in SSTables
Space used (total) 9592399 Total number of bytes of disk space used by SSTables belonging to this table, including obsolete SSTables waiting to be GCd Same as above.
Space used by snapshots (total): 0 Total number of bytes of disk space used by snapshot of this table's data About snapshots
Off heap memory used (total) Total number of bytes of off heap memory used for memtables, Bloom filters, index summaries and compression metadata for this table
SSTable Compression Ratio 0.367. . . Ratio of size of compressed SSTable data to its uncompressed size Types of compression options.
Number of keys (estimate) 3 The number of partition keys for this table Not the number of primary keys. This gives you the estimated number of partitions in the table.
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 for this table Cassandra memtable structure in memory
Memtable data size 32028148 Total number of bytes in the memtable for this table Total amount of live data stored in the memtable, excluding any data structure overhead.
Memtable off heap memory used 0 Total number of bytes of off-heap data for this memtable, including column related overhead and partitions overwritten The maximum amount is set in cassandra.yaml by the property memtable_offheap_space_in_mb.
Memtable switch count 3 Number of times a full memtable for this table was swapped for an empty one Increases each time the memtable for a table is flushed to disk. See How memtables are measured article.
Local read count 11207 Number of requests to read tables in the keyspace since startup
Local read latency 0.048 ms Round trip time in milliseconds to complete the most recent request to read the table Factors that affect read latency
Local write count 17598 Number of local requests to update the table since startup
Local write latency 0.054 ms Round trip time in milliseconds to complete an update to the table Factors that affect write latency
Pending flushes 0 Estimated number of reads, writes, and cluster operations pending for this table
Bloom filter false positives 0 Number of false positives reported by this table's Bloom filter Tuning bloom filters
Bloom filter false ratio 0.00000 Fraction of all bloom filter checks resulting in a false positive from the most recent read
Bloom filter space used, bytes 11688 Size in bytes of the bloom filter data for this table
Bloom filter off heap memory used 8 The number of bytes of off heap memory used for Bloom filters for this table
Index summary off heap memory used 41 The number of bytes of off heap memory used for index summaries for this table
Compression metadata off heap memory used 8 The number of bytes of off heap memory used for compression offset maps for this table
Compacted partition minimum 1110 Size in bytes of the smallest compacted partition for this table
Compacted partition maximum bytes 126934 Size in bytes of the largest compacted partition for this table
Compacted partition mean bytes 2730 The average size of compacted partitions for this table
Average live cells per slice (last five minutes) 0.0 Average number of cells scanned by single key queries during the last five minutes
Maximum live cells per slice (last five minutes) 0.0 Maximum number of cells scanned by single key queries during the last five minutes
Average tombstones per slice (last five minutes) 0.0 Average number of tombstones scanned by single key queries during the last five minutes
Maximum tombstones per slice (last five minutes) 0.0 Maximum number of tombstones scanned by single key queries during the last five minutes
Dropped mutations 0.0 The number of mutations (INSERTs, UPDATEs or DELETEs) started on this table but not completed A high number of dropped mutations can indicate an overloaded node.

Examples

This example shows an excerpt of the output of the command after flushing a table of library data to disk.

nodetool tablestats 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): 9088955
		Space used (total): 9088955
		Space used by snapshots (total): 0
		Off heap memory used (total): 57
		SSTable Compression Ratio: 0.8823529411764706
		Number of keys (estimate): 3
		Memtable cell count: 0
		Memtable data size: 0
		Memtable off heap memory used: 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: 11688
		Bloom filter off heap memory used: 8
		Index summary off heap memory used: 41
		Compression metadata off heap memory used: 8
		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
		Maximum live cells per slice (last five minutes): 0
		Average tombstones per slice (last five minutes): 0.0
		Maximum tombstones per slice (last five minutes): 0
		Dropped Mutations: 0

Using the human-readable option

Use the human-readable -H option to get output in easier-to-read units. For example:

nodetool tablestats cycling.calendar -H
Keyspace: cycling
	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

----------------
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