Skip to content

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

nodetool setstreamthroughput

Sets the streaming throughput limit for inter-node data transfers.


Terminal window
nodetool [connection_options] setstreamthroughput [options] <throughput>

See connection options for connection options.

nodetool setstreamthroughput controls the maximum rate at which data can be streamed between Cassandra nodes. Streaming occurs during:

  • Repair operations - Transferring data to synchronize replicas
  • Bootstrap - New nodes receiving data from existing nodes
  • Rebuild - Nodes rebuilding data from other data centers
  • Decommission - Nodes transferring data before leaving cluster
  • Node replacement - Replacement nodes receiving data

This setting affects outgoing streams from the node where the command is executed.

Non-Persistent Setting

This setting is applied at runtime only and does not persist across node restarts. After a restart, the value reverts to the stream_throughput_outbound setting in cassandra.yaml (default: 24 MiB/s).

To make the change permanent, update cassandra.yaml:

stream_throughput_outbound: 24MiB/s

OptionDescription
-m, --mibInterpret the throughput value as MiB/s instead of Mb/s
-e, --entire-sstable-throughputSet the entire-SSTable streaming throughput

ArgumentDescription
throughputMaximum streaming rate. Default unit is megabits per second (Mb/s). Use -m for MiB/s. Use 0 for unlimited.

Unit Clarification

By default, the argument is in megabits per second (Mb/s), not megabytes. For example:

  • nodetool setstreamthroughput 200 = 200 Mb/s = ~25 MiB/s
  • nodetool setstreamthroughput -m 25 = 25 MiB/s = ~200 Mb/s

cassandra.yaml Parameter

The corresponding cassandra.yaml parameter changed in 4.1:

Cassandra VersionParameter NameDefaultUnit
Pre-4.1stream_throughput_outbound_megabits_per_sec200Megabits/s
4.1+stream_throughput_outbound24MiB/sVarious

Terminal window
# Set to 200 Mb/s (~25 MiB/s)
nodetool setstreamthroughput 200
Terminal window
# Set to 25 MiB/s using the -m flag
nodetool setstreamthroughput -m 25
Terminal window
nodetool setstreamthroughput 0

Unlimited Streaming

Setting to 0 removes all throttling. Use with caution as it may saturate network bandwidth and impact other operations.

Terminal window
# Set entire-SSTable streaming throughput
nodetool setstreamthroughput -e 200
Terminal window
nodetool setstreamthroughput 200
nodetool getstreamthroughput

During scheduled maintenance windows:

Terminal window
# Increase throughput for faster repair
nodetool setstreamthroughput 400
# Run repair
nodetool repair -pr my_keyspace
# Restore normal throughput
nodetool setstreamthroughput 200

During high traffic periods:

Terminal window
# Reduce streaming to prioritize client traffic
nodetool setstreamthroughput 100

When adding new nodes:

Terminal window
# On seed nodes (streaming sources)
nodetool setstreamthroughput 300
# Monitor bootstrap progress
nodetool netstats

Speed up node removal:

Terminal window
# Before decommissioning
nodetool setstreamthroughput 400
# Start decommission
nodetool decommission
# Monitor progress
watch nodetool netstats

Adjust for cross-datacenter rebuilds:

Terminal window
# Lower throughput for WAN links
nodetool setstreamthroughput 50
# Start rebuild
nodetool rebuild dc1
# Monitor
nodetool netstats

ScenarioThroughputRationale
Default200 MB/sBalanced default
High-performance network400-800 MB/sFast 10GbE+ networks
Shared network100-200 MB/sAvoid impacting other traffic
Maintenance window400+ MB/sPrioritize streaming
Cross-DC (WAN)50-100 MB/sLimited bandwidth
During high load100 MB/sPrioritize client traffic
NetworkRecommended Range
1 GbE50-100 MB/s
10 GbE200-500 MB/s
25 GbE400-800 MB/s
AWS (same AZ)200-400 MB/s
AWS (cross AZ)100-200 MB/s
Cross region/WAN50-100 MB/s

Workflow: Rolling Repair with Optimized Streaming

Section titled “Workflow: Rolling Repair with Optimized Streaming”
repair_with_tuned_streaming.sh
#!/bin/bash
# Store original value
original=$(nodetool getstreamthroughput | awk '{print $4}')
echo "Original streaming throughput: $original MB/s"
# Increase for repair
echo "Increasing streaming throughput to 400 MB/s"
nodetool setstreamthroughput 400
# Run repair
echo "Starting repair..."
nodetool repair -pr my_keyspace
# Restore original
echo "Restoring original throughput: $original MB/s"
nodetool setstreamthroughput $original
echo "Repair complete"

On existing nodes (streaming sources):

Terminal window
# 1. Check current settings
nodetool getstreamthroughput
# 2. Increase for bootstrap
nodetool setstreamthroughput 400
# 3. (Bootstrap starts on new node)
# 4. Monitor streaming
watch 'nodetool netstats | head -20'
# 5. After bootstrap completes, restore
nodetool setstreamthroughput 200

Both affect disk I/O and should be considered together:

SettingAffectsCommand
Stream throughputNode-to-node transferssetstreamthroughput
Compaction throughputLocal SSTable processingsetcompactionthroughput
Terminal window
# Check both settings
echo "Stream: $(nodetool getstreamthroughput)"
echo "Compaction: $(nodetool getcompactionthroughput)"

Consider combined impact:

Terminal window
# During heavy streaming
nodetool setstreamthroughput 300
nodetool setcompactionthroughput 32 # Reduce to free I/O for streaming
# After streaming completes
nodetool setstreamthroughput 200
nodetool setcompactionthroughput 64 # Restore normal compaction

Terminal window
nodetool netstats

Output:

Mode: NORMAL
Not sending any streams.
Read Repair Statistics:
Attempted: 1234
Mismatch (Blocking): 56
Mismatch (Background): 78
Pool Name Active Pending Completed Dropped
Large messages 0 0 12345 0
Small messages 0 0 678901 0
Terminal window
nodetool netstats

Output during bootstrap/repair:

Mode: NORMAL
Receiving from: /192.168.1.101
/192.168.1.101
Receiving 15 files, 2.3 GB total. Already received 1.1 GB, at 45.2 MB/s
my_keyspace/my_table
Sending to: /192.168.1.102
/192.168.1.102
Sending 10 files, 1.8 GB total. Already sent 900 MB, at 38.5 MB/s
Terminal window
# Continuous monitoring
watch -n 5 'nodetool netstats | grep -E "Receiving|Sending|MB/s"'

If bootstrap/repair taking too long:

Terminal window
# Check current limit
nodetool getstreamthroughput
# Check actual rate
nodetool netstats | grep "MB/s"
# If rate << limit, bottleneck is elsewhere
# Check: disk I/O, network, source node load
# Increase limit
nodetool setstreamthroughput 400

If streaming impacts client traffic:

Terminal window
# Reduce streaming throughput
nodetool setstreamthroughput 100
# Verify client latencies improve
nodetool proxyhistograms

If streams fail or timeout:

Terminal window
# Check streaming status
nodetool netstats
# Check for errors in logs
grep -i stream /var/log/cassandra/system.log | tail -20
# Try reducing throughput (too fast can cause issues)
nodetool setstreamthroughput 100

Terminal window
for node in node1 node2 node3; do
echo "Setting streaming throughput on $node"
ssh "$node" "nodetool setstreamthroughput 200"
done
Terminal window
for node in node1 node2 node3; do
echo -n "$node: "
ssh "$node" "nodetool getstreamthroughput"
done

#!/bin/bash
# adjust_streaming.sh - Adjust streaming throughput cluster-wide
THROUGHPUT="${1:-200}"
# Get list of node IPs from local nodetool status
NODES=$(nodetool status | grep "^UN" | awk '{print $2}')
echo "Setting streaming throughput to $THROUGHPUT MB/s on all nodes"
echo "=============================================="
for node in $NODES; do
echo -n "$node: "
ssh "$node" "nodetool setstreamthroughput $THROUGHPUT" 2>/dev/null
if [ $? -eq 0 ]; then
echo "OK"
else
echo "FAILED"
fi
done
echo ""
echo "Verification:"
for node in $NODES; do
echo -n "$node: "
ssh "$node" "nodetool getstreamthroughput" 2>/dev/null | awk '{print $4 " " $5}'
done

Streaming Throughput Guidelines

  1. Know your network - Set appropriate limits for your bandwidth
  2. Adjust for operations - Increase during maintenance windows
  3. Monitor actively - Watch netstats during streaming operations
  4. Balance with compaction - Consider total I/O budget
  5. Test before production - Validate settings in non-production first
  6. Document changes - Log when and why throughput was adjusted
  7. Cluster consistency - Use similar settings across nodes
  8. WAN awareness - Use lower settings for cross-DC operations

CommandRelationship
netstatsMonitor streaming activity
repairTriggers streaming
rebuildTriggers cross-DC streaming
decommissionTriggers outgoing streams
setcompactionthroughputRelated I/O throttle
getcompactionthroughputView compaction throttle