---
id: 16846
lang: en
title: "Qdrant Replaces RocksDB with Its Own Gridstore Engine, Doubling Data Ingestion Speed"
published_at: "2026-10-27 20:02:02"
source_name: "Qdrant Articles"
source_url: "https://qdrant.tech/articles/gridstore-key-value-storage/"
canonical_url: "https://news.hamidun.com/en/news/16846"
categories: ["llm", "research"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Qdrant Replaces RocksDB with Its Own Gridstore Engine, Doubling Data Ingestion Speed

> **Краткая суть (BLUF):** Qdrant, the vector database, has replaced the general-purpose RocksDB storage with its own Rust engine, Gridstore. RocksDB compacted files in the background, causing latency spikes, yet Qdrant only needs keys that are sequential integers: 0, 1, 2, 3. In a test where one million points were loaded twice, data ingestion became twice as fast and more consistent. The takeaway: if the key shape is known, a narrow engine beats a general-purpose one.  • Blocks of 128 bytes, an array of pointers, and a bitmask of free space • Finding free space scans about 6 KB of metadata per 1 GB of data • Starting with version 1.15, Gridstore is the default storage for new installations

Qdrant, the vector database used for embedding search, has replaced its internal key-value storage, RocksDB, with its own engine, Gridstore, written in Rust. This kind of storage answers a simple question: given a record number, return its content quickly, for example the metadata (payload) attached to a vector. RocksDB is general-purpose, but Qdrant needs only a small part of its capabilities. In a test in which one million points were loaded into Qdrant twice, data ingestion on Gridstore was twice as fast, and throughput became more stable. For anyone building infrastructure on off-the-shelf general-purpose components, this is a good example of where their ceiling lies.

## Why RocksDB Stopped Working for Qdrant

At the start, Qdrant adopted RocksDB: a mature, reliable, well-documented embedded engine. Over time, complaints accumulated. RocksDB's architecture requires compaction, that is, background file consolidation, and this caused random latency spikes. The engine is designed for arbitrary keys, while Qdrant stores only sequential internal IDs: 0, 1, 2, 3, and so on. RocksDB's huge number of settings makes it flexible, but finding the right configuration is hard. On top of that, integrating C++ into a Rust project was a hassle.

The team also looked at ready-made Rust solutions but found nothing suitable. Qdrant needs full control over when and which data is written and flushed to disk. Crash recovery is already in place, and online compaction is not a priority, since that is the job of the optimizers.

## How Gridstore Works

The engine consists of three layers.

First, the data layer. Because the keys are sequential numbers, the tracker becomes a plain array of pointers. Each pointer indicates where a value starts and how long it is. To find key 3, you jump to the third position in the array. The values themselves sit in a grid of fixed-size blocks, usually 128 bytes, grouped into page files. A value occupies one or more contiguous blocks, and no block ever holds data from two values.

Second, the mask. This is a bitmap: each bit corresponds to a block, 1 means occupied, 0 means free. On deletion, the value is marked as deleted in the pointer, and its blocks are freed in the mask. On update, the new version is written to a different location, and the old blocks are freed. No costly compaction is needed.

Third, the gaps layer. Scanning the entire mask becomes slow as the storage grows, so the mask is divided into regions. For each region, the engine remembers the largest contiguous free segment, as well as the free space at the beginning and end of the region, so that neighboring regions can be merged when a large value needs the room. According to the authors, with default settings this layer amounts to a few millionths of the storage size: roughly 6 KB of metadata to scan per gigabyte of data. As a result, the remaining operations take almost constant time.

## Reliability: Lazy Updates and Rigorous Testing

Three structures must be changed in a coordinated way, and the process can crash at any moment. Qdrant relies on a write-ahead log (WAL): an operation is first recorded there, and after a failure it can be replayed. For this reason, writes must be idempotent: applying them again produces the same state as applying them once.

Gridstore updates metadata lazily. The value itself is written first, while lightweight deferred changes accumulate in a buffer and are applied only on an explicit command. This way, data is not marked as deleted before the new version has been reliably saved. In the worst case, the same write happens twice, which is a small waste of space, but valid data is not overwritten.

The engine was verified in several ways. Model testing compares Gridstore against a plain in-memory hash map: random put, delete, and update operations run on both, and the results are checked after each step. For heavier scenarios, the team built a Crasher rig, which randomly kills and restarts Qdrant under write load, then checks whether any points, vectors, or payloads have been lost. Property-based testing also helps, as it shrinks a failing test down to a minimal example.

## Numbers and Limitations

In a microbenchmark based on Bustle, Gridstore showed lower average latency across all three workload types, especially on inserts. In real Qdrant 1.12.6, the test loaded 1 million points twice, and the payload was updated through a separate request without payload indexes. The result: data ingestion was twice as fast and throughput was more stable. One drawback: RocksDB takes slightly less space, but the authors describe the difference as negligible.

The timeline is as follows: in version 1.13, Gridstore became the on-disk storage for payloads and sparse vectors, and starting with 1.15 it is used by default in new deployments. It has not been released as a standalone Rust crate, its API is still changing, and the team only leaves open the possibility of publishing it later.

The practical takeaway for engineers: a general-purpose library is a good choice at the start, but if you know the shape of your keys and already have recovery mechanisms in place, a specialized storage engine can remove latency spikes and simplify tuning. Rigorous tests, such as comparison against a reference model and forced crashes, are essential. The figures, however, come from the authors themselves, and the material contains no independent measurements.

---
- **Первоисточник:** [Qdrant Articles](https://qdrant.tech/articles/gridstore-key-value-storage/)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/16846
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
