Parallel Compression Revamp: Dramatically Reduced CPU Overhead
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.
Related posts
- Evolving our real-time timeseries storage again: Built in Rust for performance at scale
Datadog Engineering hardMasterDatadog'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. Its storage engine, Monocle, is an LSM tree with a worker-per-shard, thread-per-core design. Kafka intake tasks route data over per-shard MPSC channels to single-threaded Tokio shards, which keeps locks off the write path. Permit-based throttling and CoDel-based cost scheduling keep the system stable under load, and snapshots provide recovery. Datadog reports 60x higher ingestion throughput and 5x faster queries at peak scale.
- Native Async/Coroutine Reads in RocksDB
RocksDB Blog hardMasterRocksDB 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. Per-request PerfContext/IOStatsContext are swapped in and out of TLS via Folly RequestContext, with CPU time counted only during active slices. Benchmarks on four cores with an 11 GB direct-I/O dataset show coroutines losing ~14% at low concurrency with single-key lookups but gaining up to 305% over threads with larger batches, and 8–55% over the older ReadOptions::async_io path at 20+ tasks.
- Improving Lakebase Postgres Compute Cache on Neon, Part 1
Neon hardMaster
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. Huge pages cut per-backend page table overhead by 512× and reduce TLB misses, lowering tail read latency by up to ~40% and CPU by up to ~30% in benchmarks. Production endpoints saw up to 2× throughput, 5× fewer storage GetPage requests and 5× lower CPU, with near-100% cache hit rates. Autoscaling computes with dynamic shared buffers are planned for part 2.
- FIFO KV-Ratio Compaction for BlobDB-Backed TTL Workloads
RocksDB Blog hardMasterRocksDB 11.0 adds a KV-ratio intra-L0 compaction picker for FIFO compaction with integrated BlobDB. It targets workloads with large values, point lookups and TTL or size-bounded expiry. The old cost-based picker compares SST sizes against write_buffer_size, so BlobDB's tiny SSTs never stop growing. The new picker derives a target SST size from max_data_files_size × (SST bytes / total bytes) ÷ level0_file_num_compaction_trigger, then merges files through geometric size tiers until they graduate. This keeps blob files untouched and SST rewrite cost logarithmic, at the cost of some intermediate tier files lingering in L0.
- Recent Storage Performance Improvements at Neon
Neon hardMaster
Neon shipped a set of storage-layer optimizations across Safekeepers and Pageservers. WAL is now decoded once at Safekeepers and routed only to the relevant shard, which roughly doubles ingest throughput for large tenants. Protobuf-encoded, Zstd-compressed WAL cuts Safekeeper-to-Pageserver bandwidth by about 70%. Sparse files via ftruncate and fewer fsyncs give about 3.3x WAL write throughput. Scan prefetching of up to 100 pages made schema finalization 4x faster, prioritizing L0 compaction with ingest backpressure halved p99 read amplification, pipelined parallel S3 uploads doubled upload rate, and a graduated shard split policy (4/8/16 shards at 16 GB/1 TB/2 TB) improves mid-size and very large tenants.