What are Read Amplification and Write Amplification in the context of Cassandra's storage engine?
Last updated
Write amplification: data is rewritten to disk many times as compaction repeatedly merges SSTables. It is higher with leveled compaction.
Read amplification: one logical read may consult the Memtable plus many SSTables because a row's fragments are spread out. It is higher with size-tiered compaction.
Compaction tuning balances write, read and space amplification:
LeveledCompactionStrategyfor read-heavy,SizeTieredCompactionStrategyfor write-heavy workloads.
- https://cassandra.apache.org/doc/stable/cassandra/architecture/storage-engine.html
- https://www.jusdb.com/blog/cassandra-compaction-strategies-stcs-lcs-twcs
- https://ujjwal3009.medium.com/why-do-cassandra-rocksdb-and-scylladb-use-lsm-trees-instead-of-b-trees-b071b8693471
- https://www.instaclustr.com/blog/apache-cassandra-5-0-improving-performance-with-unified-compaction-strategy/
- https://dev.to/priteshsurana/cassandra-internals-lsm-tree-sstables-and-compaction-2ai8
- https://cassandra.apache.org/doc/stable/cassandra/managing/operating/compaction/ucs.html
- https://docs.scylladb.com/manual/stable/architecture/compaction/compaction-strategies.html