nodetool proxyhistograms
Displays latency histograms for coordinator operations including reads, writes, and range queries.
Synopsis
Section titled “Synopsis”nodetool [connection_options] proxyhistogramsSee connection options for connection options.
Description
Section titled “Description”nodetool proxyhistograms shows coordinator-level latency percentiles for:
- Read operations
- Write operations
- Range slice queries (scans)
- CAS read operations
- CAS write operations
- View write operations
These are end-to-end latencies as seen by the coordinator node, including network time to replicas.
Output Example
Section titled “Output Example”proxy histogramsPercentile Read Latency Write Latency Range Latency CAS Read Latency CAS Write Latency View Write Latency (micros) (micros) (micros) (micros) (micros) (micros)50% 234.00 89.00 567.00 345.00 456.00 0.0075% 345.00 123.00 789.00 567.00 678.00 0.0095% 678.00 234.00 1234.00 890.00 1012.00 0.0098% 890.00 345.00 1567.00 1234.00 1345.00 0.0099% 1234.00 456.00 2345.00 1567.00 1789.00 0.00Min 45.00 23.00 123.00 89.00 123.00 0.00Max 5678.00 1234.00 9012.00 4567.00 5678.00 0.00Output Fields
Section titled “Output Fields”Latency Types
Section titled “Latency Types”| Type | Description |
|---|---|
| Read Latency | Point read operations (SELECT by primary key) |
| Write Latency | Mutations (INSERT, UPDATE, DELETE) |
| Range Latency | Range queries (SELECT with range or no key) |
| CAS Read Latency | Lightweight transaction reads |
| CAS Write Latency | Lightweight transaction writes |
| View Write Latency | Materialized view updates |
Percentiles
Section titled “Percentiles”| Percentile | Meaning |
|---|---|
| 50% (median) | Half of requests are faster than this |
| 75% | 75% of requests are faster |
| 95% | 95% of requests are faster |
| 98% | 98% of requests are faster |
| 99% | 99% of requests are faster (p99) |
| Min | Fastest observed request |
| Max | Slowest observed request |
Interpreting Results
Section titled “Interpreting Results”Healthy Latencies (SSD)
Section titled “Healthy Latencies (SSD)”| Operation | p50 | p99 | Assessment |
|---|---|---|---|
| Read | < 500μs | < 5ms | Excellent |
| Read | < 2ms | < 20ms | Good |
| Read | < 5ms | < 50ms | Acceptable |
| Write | < 200μs | < 2ms | Excellent |
| Write | < 500μs | < 5ms | Good |
| Write | < 1ms | < 10ms | Acceptable |
Warning Signs
Section titled “Warning Signs”Percentile Read Latency50% 5000.0099% 50000.00High Latencies
p50 > 5ms or p99 > 50ms suggests:
- Disk I/O issues
- GC pressure
- Network problems
- Large partitions
- Inefficient queries
High Tail Latency (p99)
Section titled “High Tail Latency (p99)”50% 234.0099% 25000.00Large gap between p50 and p99 indicates:
| Cause | Investigation |
|---|---|
| GC pauses | Check gcstats, JVM logs |
| Large partitions | Check tablestats partition sizes |
| Network variability | Check inter-node latency |
| Slow replica | Check tpstats on all nodes |
Zero Latencies
Section titled “Zero Latencies”View Write Latency 0.00Zero means no operations of that type occurred since restart.
When to Use
Section titled “When to Use”Baseline Performance
Section titled “Baseline Performance”Establish baseline latencies during normal operation:
nodetool proxyhistograms > baseline_$(date +%Y%m%d).txtDuring Incidents
Section titled “During Incidents”Compare current latencies to baseline:
nodetool proxyhistogramsAfter Changes
Section titled “After Changes”After configuration or schema changes:
nodetool proxyhistogramsContinuous Monitoring
Section titled “Continuous Monitoring”watch -n 30 'nodetool proxyhistograms'Examples
Section titled “Examples”Basic Usage
Section titled “Basic Usage”nodetool proxyhistogramsCompare All Nodes
Section titled “Compare All Nodes”for node in node1 node2 node3; do echo "=== $node ===" ssh "$node" "nodetool proxyhistograms"doneExtract Read p99
Section titled “Extract Read p99”nodetool proxyhistograms | grep "99%" | awk '{print "Read p99:", $2, "μs"}'Track Over Time
Section titled “Track Over Time”while true; do echo "$(date): $(nodetool proxyhistograms | grep '99%' | awk '{print "R:"$2 " W:"$3}')" sleep 60doneCoordinator vs. Local Latency
Section titled “Coordinator vs. Local Latency”What proxyhistograms Measures
Section titled “What proxyhistograms Measures”The proxyhistograms command measures the total time from when the coordinator receives a query to when it returns the result to the client. This includes:
| Step | Description |
|---|---|
| 1 | Client sends query to coordinator |
| 2 | Coordinator sends read requests to replicas (R1, R2, R3) |
| 3 | Replicas process and return responses |
| 4 | Coordinator aggregates results and returns to client |
Measurement Scope
proxyhistograms measures the entire span from query receipt to result return, including all network round-trips to replicas.
Coordinator vs. Local
Section titled “Coordinator vs. Local”| Command | Measures | Includes |
|---|---|---|
proxyhistograms | Coordinator latency | Network + all replicas |
tablehistograms | Local latency | Only local disk operations |
High proxy latency with low table latency = network issue or slow remote replicas.
Troubleshooting High Latencies
Section titled “Troubleshooting High Latencies”Step 1: Identify Scope
Section titled “Step 1: Identify Scope”# Check if all nodes affectedfor node in node1 node2 node3; do ssh "$node" "nodetool proxyhistograms" | grep "99%"doneStep 2: Compare Proxy vs. Local
Section titled “Step 2: Compare Proxy vs. Local”# Proxy (coordinator) latencynodetool proxyhistograms
# Local (single node) latencynodetool tablehistograms my_keyspace my_tableStep 3: Check for Obvious Issues
Section titled “Step 3: Check for Obvious Issues”# Thread poolsnodetool tpstats
# GC statsnodetool gcstats
# Compaction backlognodetool compactionstatsStep 4: Investigate Specific Tables
Section titled “Step 4: Investigate Specific Tables”# Which tables are slow?nodetool tablestats my_keyspace | grep -E "Table:|read latency|write latency"Latency Degradation Patterns
Section titled “Latency Degradation Patterns”Gradual Increase
Section titled “Gradual Increase”- Growing data volume
- SSTable accumulation
- Bloom filter pressure
Sudden Spike
Section titled “Sudden Spike”- Node failure
- Network partition
- GC storm
- Compaction pressure
Periodic Spikes
Section titled “Periodic Spikes”- Scheduled jobs
- Backup operations
- Repair running
- Compaction cycles
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| tablestats | Table statistics including latencies |
| tpstats | Thread pool statistics |
| gcstats | Garbage collection statistics |
| compactionstats | Compaction activity |