Data architects are on the lookout for ways to maximize resources, while also keeping costs predictable and manageable. The right database plays a central role in achieving both – delivering better performance, scalability, and resilience without breaking the budget.
With CockroachDB 25.3 we introduced “value separation” at the storage layer (as public preview) and achieved a dramatic increase in throughput. In workloads we’ve tested, we’ve seen throughput increases between 50-60% for wide row data. This new feature is significantly benefitting our users’ ability to perform at scale, especially for write-heavy workloads.
What is value separation in CockroachDB?
Value separation in CockroachDB starts with our use of the Pebble storage engine – an embedded key-value store inspired by RocksDB and developed by Cockroach Labs – to read and write data to disk. Pebble uses a Log-structured Merge-tree (LSM) to manage data storage.
The levels of the LSM are organized from L0 to L6. L0 is the top-most level, and L6 is the bottom-most level. New data is added into L0 and then merged down into lower levels over time. The process of merging data down into lower levels is called compaction.
Traditionally in an LSM, each key-value pair is stored inline at every LSM level. As each value is compacted to the level below, it is copied to disk. Repeatedly rewriting these values creates write amplification, defined as the total bytes written to disk vs the actual size of the data. Higher write amplification increases costs for input/output operations per second (IOPS), bandwidth, and storage. For customers with large databases these added costs could get very expensive.
With value separation, rather than copy the value with each compaction, the value is written infrequently in files separate from keys. Since most compactions only copy a key and virtual pointer to the value’s data, the operation consumes significantly less write bandwidth for the same volume of writes, while also reducing the CPU used for compaction. The freed-up write bandwidth and CPU then can be used to process additional workload operations, dramatically improving throughput.
How does CockroachDB’s value separation benefit write-heavy workloads?
Naturally, the benefits of value separation are more profound with write-heavy workloads. This is because each compaction is writing smaller values. Meanwhile, costs for IOPS, bandwidth, and storage are reduced. By minimizing the demand for these resources, CockroachDB users run more efficient and performant systems that deliver higher speed, reliability, and predictability while keeping costs in check.
By using these resources more efficiently, enterprises spend less on cloud storage and network traffic while achieving faster, more predictable query response times. This leads to a better user experience, more reliable applications, and less time that database teams spend on troubleshooting. Here’s an example of the result:
Increase in write throughput with value separation enabled
The business impact: Organizations can scale data-intensive workloads, like real-time analytics and distributed applications, without hitting expensive infrastructure bottlenecks that slow innovation. Value separation is in public preview in CockroachDB v25.3 and off by default. If you’re a current CockroachDB customer, contact your support specialist to turn it on – experience first-hand how value separation can improve performance for your write-heavy workloads. Value separation is expected to be GA in CockroachDB 25.4, default on.
FAQ
What is value separation? A new storage optimization in CockroachDB that stores values separately from keys during compaction, reducing redundant writes (write amplification) and improving performance.
Why does CockroachDB use value separation? Traditional LSM trees rewrite full key-value pairs multiple times during compaction, driving up write amplification and resource costs. Value separation minimizes unnecessary writes, freeing CPU and bandwidth for actual workload operations.
How much faster is it? In our tests, value separation boosted throughput by 50–60% for wide-row, write-heavy workloads.
Who benefits most? Teams running data-intensive or write-heavy workloads – like real-time analytics or high-ingest apps – see the biggest performance and cost gains.
When will it be generally available? Value separation is in public preview in v25.3 and will be generally available in v25.4, where it’s on by default.
Try CockroachDB Today
Spin up your first CockroachDB Cloud cluster in minutes. Start with $400 in free credits. Or get a free 30-day trial of CockroachDB Enterprise on self-hosted environments.
Dipti Joshi is a Staff Product Manager at Cockroach Labs, where she drives the resilience and scalability roadmap for CockroachDB and its storage engine.
David Bressler is Staff Product Marketer for Cockroach Labs. He has worked in 26 countries, is an accomplished public speaker, and graduated with distinction with an MBA from NYU.