# New cassandra_latest.yaml configuration for a top performant Apache Cassandra®

[Blog](/blog/)&gt;[Technology](/blog/category/technical/)&gt;New cassandra\_latest.yaml configuration for a top performant Apache Cassandra® 

New cassandra\_latest.yaml configuration for a top performant Apache Cassandra®
===============================================================================

October 29, 2024 | By [ Carlos Rolo](https://www.instaclustr.com/blog/author/crolo/)

 

 

 

 



   [ ](https://x.com/intent/tweet?text=New%20cassandra_latest.yaml%20configuration%20for%20a%20top%20performant%20Apache%20Cassandra%C2%AE&url=https://www.instaclustr.com/blog/cassandra_latest-yaml/) [ ](https://www.linkedin.com/shareArticle?mini=true&url=https://www.instaclustr.com/blog/cassandra_latest-yaml/&title=&summary=New%20cassandra_latest.yaml%20configuration%20for%20a%20top%20performant%20Apache%20Cassandra%C2%AE&source=) 

**Welcome to our deep dive into the latest advancements in Apache Cassandra® 5.0, specifically focusing on the cassandra\_latest.yaml configuration that is available for new Cassandra 5.0 clusters.**

This blog post will walk you through the motivation behind these changes, how to use the new configuration, and the benefits it brings to your Cassandra clusters.

### Motivation 

The primary motivation for introducing cassandra\_latest.yaml is to bridge the gap between maintaining backward compatibility and leveraging the latest features and performance improvements. The yaml addresses the following varying needs for new Cassandra 5.0 clusters:

1. **Cassandra Developers**: who want to push new features but face challenges due to backward compatibility constraints.
2. **Operators**: who prefer stability and minimal disruption during upgrades.
3. **Evangelists and New Users**: who seek the latest features and performance enhancements without worrying about compatibility.

### Using cassandra\_latest.yaml 

Using cassandra\_latest.yaml is straightforward. It involves copying the cassandra\_latest.yaml content to your cassandra.yaml or pointing the cassandra.config JVM property to the cassandra\_latest.yaml file.

This configuration is designed for new Cassandra 5.0 clusters (or those evaluating Cassandra), ensuring they get the most out of the latest features in Cassandra 5.0 and performance improvements.

### Key changes and features 

**Key Cache Size**

- **Old**: Evaluated as a minimum from 5% of the heap or 100MB
- **Latest**: Explicitly set to 0

**Impact**: Setting the key cache size to 0 in the latest configuration avoids performance degradation with the new SSTable format. This change is particularly beneficial for clusters using the new SSTable format, which doesn’t require key caching in the same way as the old format. Key caching was used to reduce the time it takes to find a specific key in Cassandra storage.

**Commit Log Disk Access Mode**

- **Old**: Set to legacy
- **Latest**: Set to auto

**Impact**: The auto setting optimizes the commit log disk access mode based on the available disks, potentially improving write performance. It can automatically choose the best mode (e.g., direct I/O) depending on the hardware and workload, leading to better performance without manual tuning.

**Memtable Implementation**

- **Old**: Skiplist-based
- **Latest**: Trie-based

**Impact**: The trie-based memtable implementation reduces garbage collection overhead and improves throughput by moving more metadata off-heap. This change can lead to more efficient memory usage and higher write performance, especially under heavy load.































create table … with memtable = {'class': 'TrieMemtable', … }

   1



  create table … with memtable = {'class': 'TrieMemtable', … }



   

 

 **Memtable Allocation Type**

- **Old**: Heap buffers
- **Latest**: Off-heap objects

**Impact**: Using off-heap objects for memtable allocation reduces the pressure on the Java heap, which can improve garbage collection performance and overall system stability. This is particularly beneficial for large datasets and high-throughput environments.

**Trickle Fsync**

- **Old:** False
- **Latest:** True

**Impact**: Enabling trickle fsync improves performance on SSDs by periodically flushing dirty buffers to disk, which helps avoid sudden large I/O operations that can impact read latencies. This setting is particularly useful for maintaining consistent performance in write-heavy workloads.

**SSTable Format**

- **Old**: big
- **Latest**: bti (trie-indexed structure)

**Impact**: The new BTI format is designed to improve read and write performance by using a trie-based indexing structure. This can lead to faster data access and more efficient storage management, especially for large datasets.































sstable: selected\_format: bti default\_compression: zstd compression: zstd: enabled: true chunk\_length: 16KiB max\_compressed\_length: 16KiB

   1

2

3

4

5

6

7

8



  sstable:

 selected\_format: bti

 default\_compression: zstd

  compression:

 zstd:

  enabled: true

 chunk\_length: 16KiB

 max\_compressed\_length: 16KiB



   

 

 **Default Compaction Strategy**

- **Old:** STCS (Size-Tiered Compaction Strategy)
- **Latest:** Unified Compaction Strategy

**Impact:** The Unified Compaction Strategy (UCS) is more efficient and can handle a wider variety of workloads compared to STCS. UCS can reduce write amplification and improve read performance by better managing the distribution of data across SSTables.































default\_compaction: class\_name: UnifiedCompactionStrategy parameters: scaling\_parameters: T4 max\_sstables\_to\_compact: 64 target\_sstable\_size: 1GiB sstable\_growth: 0.3333333333333333 min\_sstable\_size: 100MiB

   1

2

3

4

5

6

7

8



  default\_compaction:

 class\_name: UnifiedCompactionStrategy

  parameters:

 scaling\_parameters: T4

 max\_sstables\_to\_compact: 64

 target\_sstable\_size: 1GiB

 sstable\_growth: 0.3333333333333333

 min\_sstable\_size: 100MiB



   

 

 **Concurrent Compactors**

- **Old:** Defaults to the smaller of the number of disks and cores
- **Latest:** Explicitly set to 8

**Impact:** Setting the number of concurrent compactors to 8 ensures that multiple compaction operations can run simultaneously, helping to maintain read performance during heavy write operations. This is particularly beneficial for SSD-backed storage where parallel I/O operations are more efficient.

**Default Secondary Index**

- **Old:** legacy\_local\_table
- **Latest:** sai

**Impact**: SAI is a new index implementation that builds on the advancements made with SSTable Storage Attached Secondary Index (SASI). Provide a solution that enables users to index multiple columns on the same table without suffering scaling problems, especially at write time.

**Stream Entire SSTables**

- **Old:** implicity set to True
- **Latest:** explicity set to True

**Impact:** When enabled, it permits Cassandra to [zero-copy stream](https://cassandra.apache.org/doc/latest/cassandra/architecture/streaming.html) entire eligible, SSTables between nodes, including every component. This speeds up the network transfer significantly subject to throttling specified by































 entire\_sstable\_stream\_throughput\_outbound

   1



   entire\_sstable\_stream\_throughput\_outbound



   

 

 and































entire\_sstable\_inter\_dc\_stream\_throughput\_outbound

   1



  entire\_sstable\_inter\_dc\_stream\_throughput\_outbound



   

 

 for inter-DC transfers.

**UUID SSTable Identifiers**

- **Old:** False
- **Latest:** True

**Impact:** Enabling UUID-based SSTable identifiers ensures that each SSTable has a unique name, simplifying backup and restore operations. This change reduces the risk of name collisions and makes it easier to manage SSTables in distributed environments.

![](https://www.instaclustr.com/wp-content/uploads/YAML1.jpg)

**Storage Compatibility Mode**

- **Old:** Cassandra 4
- **Latest:** None

**Impact:** Setting the storage compatibility mode to none enables all new features by default, allowing users to take full advantage of the latest improvements, such as the new sstable format, in Cassandra. This setting is ideal for new clusters or those that do not need to maintain backward compatibility with older versions.

### Testing and validation 

The cassandra\_latest.yaml configuration has undergone rigorous testing to ensure it works seamlessly. Currently, the Cassandra project CI pipeline tests both the standard (cassandra.yaml) and latest (cassandra\_latest.yaml) configurations, ensuring compatibility and performance. This includes unit tests, distributed tests, and DTests.

### Future improvements 

Future improvements may include [enforcing password strength policies and other security enhancements](https://issues.apache.org/jira/browse/CASSANDRA-17457). The community is encouraged to [suggest features](https://cassandra.apache.org/_/community.html) that could be enabled by default in cassandra\_latest.yaml.

### Conclusion 

The cassandra\_latest.yaml configuration for new Cassandra 5.0 clusters is a significant step forward in making Cassandra more performant and feature-rich while maintaining the stability and reliability that users expect. Whether you are a developer, an operator professional, or an evangelist/end user, cassandra\_latest.yaml offers something valuable for everyone.

### Try it out 

Ready to experience the incredible power of the cassandra\_latest.yaml configuration on Apache Cassandra 5.0? [Spin up your first cluster](https://console2.instaclustr.com/signup?_ga=2.200991470.1505602066.1726152168-1815699945.1710961315%22%20%EF%B7%9FHYPERLINK%20%22https:%2F%2Finstacteststag.wpengine.com%2Fplatform%2Fcassandra-5-0%2F) with a free trial on the Instaclustr Managed Platform and get started today with [Cassandra 5.0](https://www.instaclustr.com/platform/apache-cassandra-version-5-0/)!

 

### About the author

**[Carlos Rolo](https://www.instaclustr.com/blog/author/crolo/)** | Manager, Open Source Contributions

Carlos is a dedicated leader in the open source community, with impactful contributions to projects like Cassandra, OpenSearch, and Cadence. With expertise in scalability, optimization, and high-performance systems, Carlos combines technical depth with a passion for solving complex challenges across diverse technologies. His work drives innovation and strengthens the foundations of open source ecosystems.

 



 

 ![mail icon]()#### Get the latest articles for open sourceIn your inbox

 <a class="btn btn-primary btn-popup text-dark" href="">Sign up now</a> 

 

 

 

  ### Related content

 [ Zero Downtime Migration to Instaclustr 

 

 Yes, we can migrate existing Cassandra clusters to Instaclustr without any downtime. Here's what to expect from the process... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/zero-downtime-migration-to-instaclustr/) 

 [ Workflow Comparison: Uber Cadence vs Netflix Conductor 

 

 When choosing what’s right for your company’s opensource workflow needs it is important to know the difference and similarities ... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/workflow-comparison-uber-cadence-vs-netflix-conductor/) 

 [ Will Your Cassandra Database Project Succeed?: The New Stack 

 

 Open source Apache Cassandra® continues to stand out as an enterprise-proven solution for organizations seeking high availability... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/will-your-cassandra-database-project-succeed-the-new-stack/) 

 

  <a class="close-modal" href="">×</a>Sign upto ourNewsletter
-----------------------
