cassandranodetool

Cassandra Nodetool Listsnapshots output is unclear


What is true size in the output of the command nodetool listsnapshots?

There is no explanation in the Cassandra documentation.


Solution

  • Its the total size of sstables that only that snapshot has a hardlink of.

    Snapshots just create hardlinks to the actual sstable component. Once compacted and deleted away the hardlink in the snapshot may be only link referencing the inode and preventing it from being freed. Thats what it will measure.

    For example if you disable compaction and take a snapshot, immediately after the listsnapshots will show true size as zero. If you turn node off, and delete one sstable in the data directory then restart, the listsnapshots will show true size as the size of the deleted sstable.