0

We recently migrated from Cassandra to AWS Keyspaces and I am just wondering how to check for table and keyspace total size in AWS keyspaces. Any help or suggestions are much appreciated.

Autumn88
  • 351
  • 1
  • 11
karnish
  • 79
  • 1
  • 10

3 Answers3

1

currently there is no direct way to get the keyspace/table storage metrics, but you can certainly calculate the storage size if you are aware of no.of rows in the table

size of each row is calculate based on

partition key columns + clustering columns + regular columns + row metadata = total encoded size of row

for more info on how to calculate refer

https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-rows.html#calculating-row-size

https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types

FYI you will be able to see the storage in the cost explorer

Rathan
  • 43
  • 7
1

Now, you can use the BillableTableSizeInBytes CloudWatch metric to monitor and track your table storage costs over time. The BillableTableSizeInBytes metric provides the billable storage size of a table by summing up the encoded size of all the rows in the table.

Additionally, its easy to aggregate this into a keyspace using cloudwatch metric math.

SUM(SEARCH('{AWS/Cassandra,Keyspace,TableName} Keyspace="tlp_stress" MetricName="BillableTableSizeInBytes"', 'Average', 300))

You can find pre-built dashboard for a keyspace and table in the following git repository. By using the cloudformation template provided you can create a new dashboard quickly. https://github.com/aws-samples/amazon-keyspaces-cloudwatch-cloudformation-templates

The following image is cloud watch of storage size. Storage size for keyspace

MikeJPR
  • 764
  • 3
  • 14
0

i guess you have multiply number of rows * row_size https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-rows.html#calculating-row-size

user6238251
  • 66
  • 1
  • 10