---
title: "FIFO KV-Ratio Compaction for BlobDB-Backed TTL Workloads"
description: "RocksDB 11.0 adds a KV-ratio intra-L0 compaction picker for FIFO compaction with integrated BlobDB."
url: "https://swe.quest/articles/fifo-kv-ratio-compaction-for-blobdb-backed-ttl-workloads-d50be1cc261543b0"
canonical: "https://rocksdb.org/blog/2026/06/20/fifo-kv-ratio-compaction.html"
source: "RocksDB Blog"
published: "2026-06-20"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 6
tags: ["storage-engines","databases","performance"]
---

# FIFO KV-Ratio Compaction for BlobDB-Backed TTL Workloads

A post on [RocksDB Blog](https://swe.quest/sources/rocksdb.md), published 2026-06-20, 6 min read, Deep dive. Original: [https://rocksdb.org/blog/2026/06/20/fifo-kv-ratio-compaction.html](https://rocksdb.org/blog/2026/06/20/fifo-kv-ratio-compaction.html)

## Summary

RocksDB 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.

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)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- LSM-tree compaction ([easy posts on Storage engines](https://swe.quest/tags/storage-engines.md?difficulty=easy))
- RocksDB FIFO compaction
- BlobDB key-value separation

## Keywords

RocksDB, BlobDB, FIFO compaction, max\_data\_files\_size, use\_kv\_ratio\_compaction, RocksDB 11.0

## Related posts

- [Husky: Efficient compaction at Datadog scale](https://swe.quest/articles/husky-efficient-compaction-at-datadog-scale-eba7e7c7e1831aee.md): Datadog Engineering · 2025-01-29 · Hard · 18 min read · Storage engines, Analytics & OLAP, Observability, Performance engineering, Distributed databases
  Husky, Datadog's observability event store layered over object storage, keeps query cost low by controlling fragment count and layout through streaming compaction.
- [How we scale an open source, multi-tenant storage engine for Postgres written in Rust](https://swe.quest/articles/how-we-scale-an-open-source-multi-tenant-storage-engine-for-postgres-written-in-e5615307ced50afc.md): Neon · 2024-04-15 · Medium · 5 min read · Storage engines, PostgreSQL, Distributed databases, Multi-tenancy, Scaling
  Neon shards its Rust-based Pageserver storage layer by dividing each Postgres relation's 8KiB block numbers into stripes (default 256MiB) and hashing each stripe to a Pageserver.
- [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.
- [Litestream Revamped: SQLite Replication](https://swe.quest/articles/litestream-revamped-sqlite-replication-0708888533a47bfa.md): Fly.io · 2025-05-20 · Medium · 6 min read · SQLite, Replication, Storage engines, Storage systems
  Litestream is being reworked around ideas from LiteFS. It replaces the raw-WAL "shadow WAL" with transaction-aware LTX files, sorted page changesets that can be compacted LSM-style, so point-in-time restores no longer replay every intermediate page write.
- [Beyond FTS5: Building Transactional Full-Text Search in TursoDB](https://swe.quest/articles/beyond-fts5-building-transactional-full-text-search-in-tursodb-07e8d5e009fddab8.md): Turso · 2026-01-27 · Medium · 7 min read · Search, Storage engines, SQLite, Rust
  TursoDB adds native full-text search by embedding Tantivy and implementing its Directory trait on top of Turso's B-tree, storing index "files" as 512KB chunks in an internal table.

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)
