Skip to content

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

Hardware Recommendations for Cassandra

Select and configure hardware for optimal Cassandra performance.

EnvironmentCoresNotes
Development2-4Minimum viable
Production8-16Standard workloads
Heavy workloads16-32High throughput
  • More cores = better concurrent request handling
  • Higher clock speed benefits single-threaded compaction
  • Prefer modern architectures (Intel Xeon, AMD EPYC)
  • Enable hyperthreading for mixed workloads
EnvironmentRAMNotes
Development8-16GBMinimum viable
Production32-64GBTypical deployments

RAM is used for JVM heap (up to 31GB), off-heap structures (bloom filters, indexes), and OS page cache. More RAM allows larger page cache, which improves read performance for frequently accessed data.

Total RAM: 64GB
├── JVM Heap: 24GB
├── Off-heap: 4-8GB (varies with data)
└── OS Page Cache: remaining

Storage is the most critical hardware component for Cassandra performance. Cassandra's LSM-tree architecture generates significant I/O through concurrent reads, writes, compaction, and repair operations. Undersized storage creates bottlenecks that cannot be compensated by faster CPUs or more memory.

Cassandra's workload characteristics make SSDs essential for production:

OperationI/O PatternWhy SSDs Excel
ReadsRandomSSDs: ~0.1ms seek vs HDD: ~10ms
WritesSequentialSSDs handle concurrent streams
CompactionMixed read/writeRuns continuously in background
Bloom filtersRandom readsSmall random reads at query time

Spinning Disks

HDDs are unsuitable for production Cassandra. A single HDD provides ~150 IOPS with 10ms latency. Under compaction load, query latency becomes unpredictable and repair operations can take days instead of hours.

InterfaceMax BandwidthTypical IOPSLatencyUse Case
NVMe (PCIe 4.0)7,000 MB/s500K-1M+10-20μsHigh performance
NVMe (PCIe 3.0)3,500 MB/s200K-500K20-50μsStandard production
SATA III550 MB/s50K-100K50-100μsBudget production
SAS 12Gbps1,200 MB/s100K-200K30-50μsEnterprise arrays
FeatureEnterprise SSDConsumer SSD
Endurance (TBW)3-10+ DWPD0.3-1 DWPD
Power loss protectionFull capacitor backupPartial or none
Sustained performanceConsistentDegrades under load
Warranty5 years3-5 years
Cost2-3x higherLower

Enterprise SSDs Recommended

Cassandra's continuous compaction creates sustained write pressure. Consumer SSDs may exhibit performance degradation after garbage collection fills the drive. Enterprise SSDs maintain consistent performance under sustained load.

DWPD (Drive Writes Per Day): Indicates endurance. A 1TB drive with 1 DWPD can sustain 1TB of writes daily for its warranty period. Cassandra's write amplification from compaction means actual drive writes exceed application writes by 2-10x depending on compaction strategy.

CategoryExample ModelsNotes
Enterprise NVMeIntel P5510, Samsung PM9A3, Micron 7450Best performance and endurance
Enterprise SATASamsung PM893, Intel S4610, Micron 5300Good balance of cost and performance
CloudAWS io2, GCP pd-extreme, Azure UltraProvisioned IOPS available

Cassandra performs multiple I/O operations concurrently:

Concurrent I/O OperationsConcurrent I/O OperationsConcurrent I/O OperationsClient Reads(random I/O)Client Writes(sequential)Compaction(read + write)Repair/Streaming(bulk read/write)Hint Replay(sequential)AvailableIOPS
OperationIOPS ConsumptionPattern
Client reads1-10 per queryRandom reads across SSTables
Client writes1 per writeSequential to commit log
Compaction10-50% of capacitySustained read/write
Repair20-80% during validationBulk sequential
StreamingThrottled (default ~25 MB/s)Bulk sequential

Cassandra is I/O efficient by design:

  • Writes: Sequential to commit log, buffered in memtables - minimal IOPS
  • Reads: Often served from page cache or key cache - IOPS depends on cache hit rate
  • Compaction: Mostly sequential I/O, runs in background

Actual IOPS requirements vary significantly based on cache hit rates, read/write ratio, and data model. A well-tuned cluster with good cache hit rates requires far fewer IOPS than raw operation counts suggest.

Size by Monitoring

Rather than estimating IOPS requirements upfront, monitor actual disk utilization with iostat. If %util stays consistently high (>70%) or await increases, storage is the bottleneck.

Terminal window
# Monitor current IOPS usage
iostat -x 1
# Key metrics:
# r/s - reads per second
# w/s - writes per second
# await - average I/O wait time (should be < 1ms for NVMe)
# %util - utilization (sustained > 80% indicates bottleneck)

SATA SSDs (~550 MB/s) are sufficient for most production workloads. Bandwidth matters primarily for:

  • Compaction: Background merging of SSTables
  • Streaming: Throttled by default (~24 MiB/s via stream_throughput_outbound)
  • Repair: Merkle tree validation and data synchronization

Streaming Configuration Parameter

The streaming throughput parameter changed in Cassandra 4.1:

Cassandra VersionParameter NameDefault
Pre-4.1stream_throughput_outbound_megabits_per_sec200 (Mb/s ≈ 25 MB/s)
4.1+stream_throughput_outbound24MiB/s

NVMe provides higher bandwidth that can speed up compaction and repair, but is not required for most deployments.

With NVMe, a single disk is sufficient for all Cassandra directories (data, commit log, hints). NVMe's high IOPS and low latency eliminate the need for separate devices that was common with SATA or spinning disks.

Separating commit log to a dedicated device may still provide marginal benefit in extremely write-heavy workloads, but is generally unnecessary for modern NVMe deployments.

Required capacity = Data size × Replication Factor × Compaction overhead × Safety margin
Components:
- Data size: Raw application data
- Replication Factor: Typically 3
- Compaction overhead: 1.5x for STCS, 1.1x for LCS
- Safety margin: 1.2x (for growth and temporary files)

Example calculation:

Application data: 500GB
Replication factor: 3
Compaction strategy: STCS (1.5x overhead)
Safety margin: 1.2x
Per-node capacity = 500GB × 1.5 × 1.2 = 900GB
Cluster capacity = 900GB × 3 nodes = 2.7TB total

Disk Space for Compaction

Cassandra requires free disk space for compaction. The amount needed depends on table sizes and compaction strategy. STCS on a single large table may temporarily double that table's disk usage during compaction. With many smaller tables or LCS, space requirements are lower. Monitor disk usage and ensure headroom for the largest table's compaction.

With SSDs, RAID is generally unnecessary. Cassandra's replication provides data redundancy at the application level.

Multiple SSDs: Use LVM to combine disks into a single logical volume. This simplifies backup operations and Cassandra configuration compared to listing multiple data_file_directories.

Terminal window
# Example: Create LVM volume from multiple disks
pvcreate /dev/nvme1n1 /dev/nvme2n1
vgcreate cassandra_vg /dev/nvme1n1 /dev/nvme2n1
lvcreate -l 100%FREE -n data cassandra_vg
mkfs.xfs /dev/cassandra_vg/data

Avoid Multiple data_file_directories

While Cassandra supports multiple data_file_directories, this complicates backup and restore operations. Use LVM to present multiple disks as a single volume.

Single SSD: Common in cloud deployments. No additional configuration needed.

Storage TypeIOPSLatencyPersistenceUse Case
gp3Up to 16KModeratePersistentMost production workloads
io2 Block ExpressUp to 256KLowPersistentHigh-performance requirements
Instance Store (NVMe)Very highLowestLost on stopHighest performance (ephemeral)

Cloud storage often requires explicit IOPS provisioning:

Terminal window
# AWS gp3 example
# Base: 3,000 IOPS, 125 MB/s
# Can provision up to 16,000 IOPS, 1,000 MB/s
# AWS io2 example
# Up to 64,000 IOPS per volume
# Up to 256,000 IOPS with Block Express
Cloud ProviderHigh-Performance OptionMax IOPS
AWSio2 Block Express256,000
GCPpd-extreme120,000
AzureUltra Disk160,000

Key metrics to track:

MetricHealthy RangeAction if Exceeded
Disk utilization< 50%Add capacity or nodes
I/O await< 1ms (NVMe), < 5ms (SATA)Upgrade storage or reduce load
IOPS utilization< 70%Provision more IOPS
Compaction pending< 100Increase compaction throughput
Terminal window
# Monitor disk I/O
iostat -xm 5
# Check compaction backlog
nodetool compactionstats
# View pending compactions
nodetool tpstats | grep -i compaction
EnvironmentBandwidthNotes
Single DC1 GbpsMinimum
Production10 GbpsRecommended
Heavy replication25+ GbpsMulti-DC, high throughput
  • Same rack: < 0.5ms
  • Same DC: < 1ms
  • Cross-DC: Plan for 20-100ms+
CPU: 4 cores
RAM: 16GB
Storage: 256GB SSD
Network: 1 Gbps
CPU: 8 cores
RAM: 32GB
Storage: 1TB NVMe
Network: 10 Gbps
CPU: 16 cores
RAM: 64GB
Storage: 2TB NVMe × 2 (JBOD)
Network: 10 Gbps
CPU: 32 cores
RAM: 128GB
Storage: 2TB NVMe × 4 (JBOD)
Network: 25 Gbps
WorkloadInstancevCPURAMStorage
Devm5.xlarge416GBgp3
Smalli3.2xlarge861GBNVMe
Standardi3.4xlarge16122GBNVMe
Heavyi3.8xlarge32244GBNVMe
WorkloadInstancevCPURAM
Devn2-standard-4416GB
Smalln2-highmem-8864GB
Standardn2-highmem-1616128GB
WorkloadInstancevCPURAM
DevStandard_D4s_v3416GB
SmallStandard_L8s_v2864GB
StandardStandard_L16s_v216128GB
Nodes needed = (Data size × RF) / (Storage per node × 0.5)
Example:
- 2TB raw data
- RF = 3
- 1TB storage per node
- Nodes = (2TB × 3) / (1TB × 0.5) = 12 nodes
IssueProblemSolution
Spinning disksSlow compaction, high latencyUse SSDs
Small heapFrequent GC, instabilityProper sizing
Overprovisioned heapWasted RAM, long GCMax 31GB
Network congestionTimeouts, inconsistency10Gbps+
Heterogeneous clusterUneven loadUniform hardware