Reputation: 61
I start with cassandra and I want to know the size on disk of my column family.
I search and I found the command : nodetool-h localhost-p 7199 cfstats
Column Family: client
SSTable count: 3
Space used (live): 281774148
Space used (total): 281774148
Number of Keys (estimate): 1010176
Memtable Columns Count: 0
Memtable Data Size: 0
Memtable Switch Count: 0
Read Count: 0
Read Latency: NaN ms.
Write Count: 0
Write Latency: NaN ms.
Pending Tasks: 0
Bloom Filter False Postives: 0
Bloom Filter False Ratio: 0,00000
Bloom Filter Space Used: 3752864
Key cache capacity: 200000
Key cache size: 0
Key cache hit rate: NaN
Row cache: disabled
Compacted row minimum size: 216
Compacted row maximum size: 310
Compacted row mean size: 310
but I don't understand the result, so can you help me ?
Upvotes: 1
Views: 1486
Reputation: 11110
The actual amount of space being used is 'Space used (total)'. This is measured in bytes.
The value of 'Space used (live)' is just for the files (SSTables) being used. It may be less than 'Space used (total)' because, during compaction, there will be unused parts of files being merged that can't be deleted yet. When a compaction finishes, it will be able to delete these duplicates and then 'Space used (total)' will decrease.
Note all these numbers are per node. If you want total usage then sum the numbers up for the cfstats output on each node.
Upvotes: 3