---
title: "Parallel Compression Revamp: Dramatically Reduced CPU Overhead"
description: "RocksDB 10.7 rewrites parallel compression for SST generation around a lock-free ring buffer of in-progress blocks."
url: "https://swe.quest/articles/parallel-compression-revamp-dramatically-reduced-cpu-overhead-347cdd5afee49826"
canonical: "https://rocksdb.org/blog/2025/10/08/parallel-compression-revamp.html"
source: "RocksDB Blog"
published: "2025-10-08"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 5
tags: ["storage-engines","concurrency","performance","c-cpp"]
---

# Parallel Compression Revamp: Dramatically Reduced CPU Overhead

A post on [RocksDB Blog](https://swe.quest/sources/rocksdb.md), published 2025-10-08, 5 min read, Deep dive. Original: [https://rocksdb.org/blog/2025/10/08/parallel-compression-revamp.html](https://rocksdb.org/blog/2025/10/08/parallel-compression-revamp.html)

## Summary

RocksDB 10.7 rewrites parallel compression for SST generation around a lock-free ring buffer of in-progress blocks. Worker threads both compress and write blocks in a quasi-work-stealing scheme and are woken only when buffer utilization justifies it. CPU overhead drops by up to 65% while throughput holds or improves: ZSTD default with parallel\_threads=3 now gives ~58% more throughput for ~25% more CPU, versus ~38% for ~73% before. The feature is now considered production-ready, with parallel\_threads≈3 as a safe sweet spot, best suited to bulk SST generation and remote compaction rather than latency-sensitive live hosts.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [C & C++](https://swe.quest/tags/c-cpp.md) (Languages)

## Prerequisites

- RocksDB SST files and compaction
- LSM trees ([easy posts on Storage engines](https://swe.quest/tags/storage-engines.md?difficulty=easy))
- lock-free atomics ([easy posts on Concurrency](https://swe.quest/tags/concurrency.md?difficulty=easy))

## Keywords

RocksDB, ZSTD, LZ4HC, db\_bench, HyperClockCache, C++20 semaphores

## Related posts

- [Evolving our real-time timeseries storage again: Built in Rust for performance at scale](https://swe.quest/articles/evolving-our-real-time-timeseries-storage-again-built-in-rust-for-performance-cbd41a18b9630cd7.md): Datadog Engineering · 2025-08-04 · Hard · 21 min read · Storage engines, Rust, Performance engineering, Databases, Concurrency
  Datadog's sixth-generation real-time timeseries database (RTDB) is a Rust rewrite that unifies two earlier engines, one for scalar metrics and one for DDSketch distributions, after earlier generations built on Cassandra, Redis, MDBM, a Go B+ tree and RocksDB.
- [Native Async/Coroutine Reads in RocksDB](https://swe.quest/articles/native-async-coroutine-reads-in-rocksdb-a16f6ef8c30162a7.md): RocksDB Blog · 2026-08-24 · Hard · 10 min read · Storage engines, Concurrency, C & C++, Performance engineering, Databases
  RocksDB 11.10.0 adds experimental native asynchronous Get/MultiGet APIs (callback-based GetAsync/MultiGetAsync and Folly-task-based CoroDB::CoGet/CoMultiGet) that suspend a read at the SST block-miss filesystem boundary and resume it on the same io\_uring-backed EventBase thread, so a small read executor can sustain high storage queue depth without one parked thread per read.
- [Improving Lakebase Postgres Compute Cache on Neon, Part 1](https://swe.quest/articles/improving-lakebase-postgres-compute-cache-on-neon-part-1-96696f73ade727a0.md): Neon · 2026-09-09 · Hard · 9 min read · PostgreSQL, Caching, Performance engineering, Memory management, Virtualization
  On large fixed-size Lakebase Postgres computes, Neon now disables its NVMe-backed local file cache and sets shared buffers to 75% of DRAM (up from a 1 GB cap), backed by explicit 2 MB HugeTLB pages provisioned through host, hypervisor and guest VM.
- [FIFO KV-Ratio Compaction for BlobDB-Backed TTL Workloads](https://swe.quest/articles/fifo-kv-ratio-compaction-for-blobdb-backed-ttl-workloads-d50be1cc261543b0.md): RocksDB Blog · 2026-06-20 · Hard · 6 min read · Storage engines, Databases, Performance engineering
  RocksDB 11.0 adds a KV-ratio intra-L0 compaction picker for FIFO compaction with integrated BlobDB.
- [Recent Storage Performance Improvements at Neon](https://swe.quest/articles/recent-storage-performance-improvements-at-neon-e29e2d9302293c1f.md): Neon · 2025-07-15 · Hard · 8 min read · PostgreSQL, Storage engines, Performance engineering, Distributed databases, Storage systems
  Neon shipped a set of storage-layer optimizations across Safekeepers and Pageservers.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
