3

Is there a quick way to determine how much disk space a particular metric is taking up?

Bharthan
  • 1,458
  • 2
  • 17
  • 29

1 Answers1

1

Yes and no...

You can count the number of samples for the metric (using count aggregator), then multiply by ~8-9 bytes for long and ~12-14 bytes for doubles (this is what I measured with test data). For strings, it depends more on your data.

Loic
  • 1,088
  • 7
  • 19
  • Can i check the disk space used up by Cassandra before and after the insertion of data and get the difference? using some linux command like "du –hac *" in the /var/lib folder of linux – Bharthan Aug 12 '15 at 17:10
  • 1
    Yes you can, but I don't believe it's representative of anything. For instance new inserts are initially put in memory tables and Cassandra commit log, which is recommended to be on a different disk than the data. So the number would not be significative with regards to actual data size once flushed in data disk (SSTables). Moreover this would give you the size of all Cassandra metrics, not only one metric, because some others may be inserted in the meantime. – Loic Aug 13 '15 at 06:01
  • 1
    If you don't care that you may have some other metrics and want to know Cassandra used disk space, you can do a flush (nodetool flush ) then you can do a "nodetools cfstats " to get the actual data size in cassandra (if you wait or trigger a compaction that will also change). Keyspace name is by default kairosdb. – Loic Aug 13 '15 at 06:01