Skip to content

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

nodetool tablehistograms

Displays latency and size histograms for a specific table.


Terminal window
nodetool [connection_options] tablehistograms <keyspace> <table>

See connection options for connection options.

nodetool tablehistograms provides detailed latency percentile distributions and size statistics for a specific table. This is more detailed than tablestats and shows how read/write latencies are distributed.


ArgumentDescription
keyspaceThe keyspace containing the table
tableThe table to analyze

my_keyspace/my_table histograms
Percentile Read Latency Write Latency SSTables Partition Size Cell Count
(micros) (micros) (bytes)
50% 158.49 120.00 1.00 310 1
75% 219.34 158.49 1.00 535 2
95% 545.79 315.85 2.00 1597 5
98% 943.13 545.79 2.00 2759 8
99% 1258.93 776.05 3.00 4768 14
Min 61 52 1.00 104 1
Max 25109 15209 7.00 1213897 29173

FieldDescription
Read LatencyLocal read latency in microseconds
Write LatencyLocal write latency in microseconds
SSTablesNumber of SSTables read per query
Partition SizeSize of partitions in bytes
Cell CountNumber of cells per partition

PercentileMeaning
50% (P50)Median - half of operations are faster
75% (P75)75% of operations are faster
95% (P95)Common SLA target
98% (P98)Near-worst case
99% (P99)Tail latency
MinFastest observed
MaxSlowest observed

Terminal window
nodetool tablehistograms my_keyspace my_table
Terminal window
for table in users orders products; do
echo "=== $table ==="
nodetool tablehistograms my_keyspace $table | head -10
done

50%: 100-500 µs (excellent)
95%: 1-5 ms (good)
99%: 5-20 ms (acceptable)
Max: < 100 ms (no major outliers)
SymptomPossible Cause
High P50Slow disks, large partitions
P99 >> P95GC pauses, disk contention
High MaxOccasional extreme latency
High SSTable countCompaction backlog
Large partition sizeData model issue

The SSTables column shows how many SSTables are read per query:

SSTables
1.00 # Ideal - data in one SSTable
2.00 # Good - minor merging needed
5.00+ # Problem - compaction needed

High SSTable Count

If P95+ shows many SSTables per read:

  • Check compaction is running
  • Consider different compaction strategy
  • May indicate writes outpacing compaction

Partition Size (bytes)
50%: 310 # Small partitions (good)
99%: 4768 # Larger partitions
Max: 1213897 # ~1.2 MB largest partition
SizeAssessment
< 10 KBExcellent
10-100 KBGood
100 KB - 1 MBMonitor
> 1 MBPotential problem
> 100 MBSerious issue

Number of cells (column values) per partition:

Cell Count
50%: 1 # Minimal cells
99%: 14 # Moderate
Max: 29173 # Wide partition

High cell counts indicate wide partitions that may cause:

  • Slow reads
  • Memory pressure
  • GC issues

Terminal window
# Capture baseline for comparison
nodetool tablehistograms my_keyspace my_table > baseline_$(date +%Y%m%d).txt
Terminal window
# Check if table has latency issues
nodetool tablehistograms my_keyspace slow_table

Look for:

  • High P95/P99 latencies
  • High SSTable counts
  • Large partitions
Terminal window
# Understand data distribution
nodetool tablehistograms my_keyspace my_table | grep -A10 "Partition Size"

CommandScopeDetail Level
tablehistogramsSingle tableDetailed percentiles
tablestatsAll tablesSummary statistics
proxyhistogramsCoordinator levelNetwork + local latency
  • tablehistograms: Local read/write on this node only
  • proxyhistograms: Full request (includes network to replicas)

If proxyhistograms >> tablehistograms, the issue is network/remote nodes.


Terminal window
nodetool tablehistograms my_keyspace my_table | grep "99%" | awk '{print $2}'
#!/bin/bash
P99=$(nodetool tablehistograms my_keyspace my_table | grep "99%" | awk '{print $2}')
THRESHOLD=5000 # 5ms in microseconds
if (( $(echo "$P99 > $THRESHOLD" | bc -l) )); then
echo "ALERT: P99 read latency is ${P99}µs (threshold: ${THRESHOLD}µs)"
fi
#!/bin/bash
echo "Table,P50_Read,P95_Read,P99_Read,Max_Read"
for table in users orders products; do
stats=$(nodetool tablehistograms my_keyspace $table)
p50=$(echo "$stats" | grep "50%" | awk '{print $2}')
p95=$(echo "$stats" | grep "95%" | awk '{print $2}')
p99=$(echo "$stats" | grep "99%" | awk '{print $2}')
max=$(echo "$stats" | grep "Max" | awk '{print $2}')
echo "$table,$p50,$p95,$p99,$max"
done

CommandRelationship
tablestatsSummary statistics for tables
proxyhistogramsCoordinator-level latencies
compactionstatsCheck compaction backlog
tpstatsThread pool statistics