Skip to content

Instantly share code, notes, and snippets.

@al3xandru
Created March 5, 2014 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save al3xandru/9374153 to your computer and use it in GitHub Desktop.
Save al3xandru/9374153 to your computer and use it in GitHub Desktop.
# sample output for 5742
# feel free to give more sensible / interesting names to KSs and CFs ordering is based on time of creation of the KS/CF.
lyubent:bin lyubentodorov$ ./nodetool listsnapshots
Snapshot Details:
Snapshot name Keyspace name Column family name True size Size on disk
1393952912539 europe resources 3.44 MB 3.46 MB
1393952912539 europe countries 0 bytes 16.86 MB
1393952912539 asia countries 0 bytes 16.41 MB
1393952912539 northamerica countries 0 bytes 16.17 MB
Total TrueDiskSpaceUsed: 3.44 MB
# just some overview of the above, size on disk is the size of the snapshot folder, true size should be 0 as long
# as all sstables in the snapshot are still alive and well in cassandra. If we remove tables from cassandra's data
# (or flush in 2.1 and later) directories then true size grows, as removing the snapshot means that dataloss will
# occur.
# sample output for 6231 (the interesting one is europe.resources, specifically the
# 'Space used by snapshots (total), bytes: 3603523' line
# P.S. i specify the 3 keyspaces that I want to list to avoid displaying system & system_traces
lyubent:bin lyubentodorov$ ./nodetool cfstats europe asia northamerica
Keyspace: europe
Read Count: 0
Read Latency: NaN ms.
Write Count: 473851
Write Latency: 0.013006717301430196 ms.
Pending Flushes: 0
Table: resources
SSTable count: 1
Space used (live), bytes: 3631260
Space used (total), bytes: 3631260
Space used by snapshots (total), bytes: 3603523
SSTable Compression Ratio: 0.2672612222153427
Memtable cell count: 0
Memtable data size, bytes: 0
Memtable switch count: 1
Local read count: 0
Local read latency: NaN ms
Local write count: 80755
Local write latency: 0.011 ms
Pending flushes: 0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used, bytes: 100960
Compacted partition minimum bytes: 43
Compacted partition maximum bytes: 50
Compacted partition mean bytes: 50
Average live cells per slice (last five minutes): 0.0
Average tombstones per slice (last five minutes): 0.0
Table: countries
SSTable count: 2
Space used (live), bytes: 17683116
Space used (total), bytes: 17740440
Space used by snapshots (total), bytes: 0
SSTable Compression Ratio: 0.2689002364508032
Memtable cell count: 0
Memtable data size, bytes: 0
Memtable switch count: 4
Local read count: 0
Local read latency: NaN ms
Local write count: 393096
Local write latency: 0.013 ms
Pending flushes: 0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used, bytes: 489976
Compacted partition minimum bytes: 43
Compacted partition maximum bytes: 50
Compacted partition mean bytes: 50
Average live cells per slice (last five minutes): 0.0
Average tombstones per slice (last five minutes): 0.0
----------------
Keyspace: asia
Read Count: 0
Read Latency: NaN ms.
Write Count: 382186
Write Latency: 0.014036076674708128 ms.
Pending Flushes: 0
Table: countries
SSTable count: 1
Space used (live), bytes: 17205954
Space used (total), bytes: 17289878
Space used by snapshots (total), bytes: 0
SSTable Compression Ratio: 0.270545675284612
Memtable cell count: 0
Memtable data size, bytes: 0
Memtable switch count: 3
Local read count: 0
Local read latency: NaN ms
Local write count: 382186
Local write latency: 0.014 ms
Pending flushes: 0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used, bytes: 473160
Compacted partition minimum bytes: 43
Compacted partition maximum bytes: 50
Compacted partition mean bytes: 50
Average live cells per slice (last five minutes): 0.0
Average tombstones per slice (last five minutes): 0.0
----------------
Keyspace: northamerica
Read Count: 0
Read Latency: NaN ms.
Write Count: 376319
Write Latency: 0.015049048812310832 ms.
Pending Flushes: 0
Table: countries
SSTable count: 1
Space used (live), bytes: 16954291
Space used (total), bytes: 17036927
Space used by snapshots (total), bytes: 0
SSTable Compression Ratio: 0.2711298363095238
Memtable cell count: 0
Memtable data size, bytes: 0
Memtable switch count: 3
Local read count: 0
Local read latency: NaN ms
Local write count: 376319
Local write latency: 0.015 ms
Pending flushes: 0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used, bytes: 467216
Compacted partition minimum bytes: 43
Compacted partition maximum bytes: 50
Compacted partition mean bytes: 50
Average live cells per slice (last five minutes): 0.0
Average tombstones per slice (last five minutes): 0.0
----------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment