Home / Companies / DataStax / Blog / Post Details
Content Deep Dive

Improving compaction in Cassandra with cardinality estimation

Blog post from DataStax

Post Details
Company
Date Published
Author
Jonathan Ellis
Word Count
660
Company Posts That Month
2
Language
English
Hacker News Points
-
Post removed?
No
Summary

Compaction is a process in Cassandra whereby log-structured data files are merged to evict obsolete or deleted rows. The first component consulted on a read is the Bloom filter, which is a probabilistic set that saves memory by taking just a few bits per key stored. However, bloom filters are not re-sizeable and can waste space if sstables overlap. To solve this problem, Cassandra 2.1 uses HyperLogLog for cardinality estimation to get an accurate count of how much the compacting sstables overlap, saving about 40% of the bloom filter overhead. Experimentally, using cardinality estimation to pick better compaction candidates could be a significant improvement for overwrite-heavy and append-mostly workloads.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.