Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Storage

The storage virtual tables provide visibility into disk usage, partition sizes, snapshots, and running SSTable operations like compaction.


Shows disk space used per table on this node.

VIRTUAL TABLE system_views.disk_usage (
keyspace_name text,
table_name text,
mebibytes bigint,
PRIMARY KEY ((keyspace_name, table_name))
)
ColumnTypeDescription
keyspace_nametextKeyspace name
table_nametextTable name
mebibytesbigintDisk space used (MiB)
-- Disk usage by table
SELECT keyspace_name, table_name, mebibytes
FROM system_views.disk_usage;
-- Tables over 10 GB (10240 MiB)
SELECT keyspace_name, table_name, mebibytes
FROM system_views.disk_usage
WHERE mebibytes > 10240;

Shows the largest partition size per table. Critical for identifying oversized partitions.

VIRTUAL TABLE system_views.max_partition_size (
keyspace_name text,
table_name text,
mebibytes bigint,
PRIMARY KEY ((keyspace_name, table_name))
)
ColumnTypeDescription
keyspace_nametextKeyspace name
table_nametextTable name
mebibytesbigintLargest partition size (MiB)
-- Tables with large partitions
SELECT keyspace_name, table_name, mebibytes
FROM system_views.max_partition_size
WHERE mebibytes > 100;

Large Partition Impact

SizeStatusImpact
< 100 MiBNormalHealthy
100-500 MiBWarningMay cause GC pressure, slow repairs
500 MiB - 1 GiBCriticalPerformance degradation likely
> 1 GiBSevereRequires data model redesign

Shows the largest SSTable size per table.

VIRTUAL TABLE system_views.max_sstable_size (
keyspace_name text,
table_name text,
mebibytes bigint,
PRIMARY KEY ((keyspace_name, table_name))
)
-- Tables with large SSTables
SELECT keyspace_name, table_name, mebibytes
FROM system_views.max_sstable_size
WHERE mebibytes > 1000;

Shows the age of the oldest SSTable per table. Useful for identifying compaction issues.

VIRTUAL TABLE system_views.max_sstable_duration (
keyspace_name text,
table_name text,
max_sstable_duration bigint,
PRIMARY KEY ((keyspace_name, table_name))
)
ColumnTypeDescription
max_sstable_durationbigintAge of oldest SSTable (milliseconds)
-- Tables with old SSTables (potential compaction issues)
SELECT keyspace_name, table_name,
max_sstable_duration / 86400000 AS days_old
FROM system_views.max_sstable_duration
WHERE max_sstable_duration > 604800000; -- > 7 days

Old SSTables

Old SSTables may indicate:

  • Compaction falling behind
  • TWCS windows not expiring
  • Data written once and never updated

Lists all snapshots on this node with size information.

VIRTUAL TABLE system_views.snapshots (
name text,
keyspace_name text,
table_name text,
created_at timestamp,
ephemeral boolean,
expires_at timestamp,
size_on_disk bigint,
true_size bigint,
PRIMARY KEY (name, keyspace_name, table_name)
) WITH CLUSTERING ORDER BY (keyspace_name ASC, table_name ASC)
ColumnTypeDescription
nametextSnapshot name
keyspace_nametextKeyspace
table_nametextTable
created_attimestampCreation timestamp
true_sizebigintActual data size (bytes)
size_on_diskbigintDisk space used (may differ due to hardlinks)
expires_attimestampAuto-expiration time (if TTL set)
ephemeralbooleanAuto-cleanup snapshot

Equivalent nodetool command: nodetool listsnapshots

-- All snapshots
SELECT name, keyspace_name, table_name, created_at, true_size
FROM system_views.snapshots;

Filter by created_at in application to find old snapshots for cleanup.


Shows currently running SSTable operations (compaction, cleanup, scrub, etc.).

VIRTUAL TABLE system_views.sstable_tasks (
keyspace_name text,
table_name text,
task_id timeuuid,
completion_ratio double,
kind text,
progress bigint,
total bigint,
sstables int,
target_directory text,
unit text,
PRIMARY KEY (keyspace_name, table_name, task_id)
) WITH CLUSTERING ORDER BY (table_name ASC, task_id ASC)
ColumnTypeDescription
keyspace_nametextKeyspace
table_nametextTable
task_idtimeuuidUnique task identifier
kindtextOperation type (lowercase: compaction, cleanup, scrub, etc.)
progressbigintBytes/rows processed
totalbigintTotal bytes/rows to process
completion_ratiodoubleProgress percentage (0.0-1.0)
sstablesintNumber of SSTables involved
unittextUnit of progress (bytes, keys, etc.)
target_directorytextOutput directory

Equivalent nodetool command: nodetool compactionstats

-- All running tasks
SELECT keyspace_name, table_name, kind, completion_ratio, sstables
FROM system_views.sstable_tasks;
-- Compaction progress (note: kind values are lowercase)
SELECT keyspace_name, table_name, kind,
progress, total,
completion_ratio * 100 AS percent_complete
FROM system_views.sstable_tasks
WHERE kind = 'compaction';
-- Large compaction operations
SELECT keyspace_name, table_name, sstables, total / 1073741824 AS total_gb
FROM system_views.sstable_tasks
WHERE total > 10737418240; -- > 10 GB

-- Alert: Partitions exceeding threshold
SELECT keyspace_name, table_name, mebibytes
FROM system_views.max_partition_size
WHERE mebibytes > 100;
-- Alert: Snapshots older than 7 days
SELECT name, created_at
FROM system_views.snapshots
WHERE created_at < toTimestamp(now()) - 604800s;
-- Alert: Long-running compactions (> 1 hour with < 50% progress)
-- Requires application logic to track over time
SELECT keyspace_name, table_name, kind, completion_ratio
FROM system_views.sstable_tasks
WHERE kind = 'compaction';
-- Current disk usage for trending
SELECT keyspace_name, table_name, mebibytes
FROM system_views.disk_usage;

-- Disk usage by table
SELECT keyspace_name, table_name, mebibytes
FROM system_views.disk_usage;
-- Largest partitions by table
SELECT keyspace_name, table_name, mebibytes
FROM system_views.max_partition_size;
-- Largest SSTables by table
SELECT keyspace_name, table_name, mebibytes
FROM system_views.max_sstable_size;

Filter out system keyspaces in application if needed.