VictoriaMetrics

VictoriaMetrics is time series database management system that is designed as a storage back-end for Prometheus.

Indexes

Inverted Index (Full Text) Log-Structured Merge Tree

VictoriaMetrics stores the data in MergeTree, which is from ClickHouse and similar to LSM. The MergeTree has particular design decision compared to canonical LSM.

MergeTree is column-oriented. Each column is stored separately. And the data is sorted by the "primary key", and the "primary key" doesn't have to be unique. It speeds up the look-up through the "primary key", and gets the better compression ratio. The "parts" is similar to SSTable in LSM; it can be merged into bigger parts. But it doesn't have strict levels.

The Inverted Index is built on "mergeset" (A data structure built on top of MergeTree ideas). It's used for fast lookup by given the time-series selector.

Data Model

Key/Value

Checkpoints

Non-Blocking Consistent

VictoriaMetrics uses their modified version of LSM tree (Logging Structure Merge Tree). All the tables and indexes on the disk are immutable once created. When it's making the snapshot, they just create the hard link to the immutable files.

Logging

Not Supported

The author argued that the time series DBMSs don't need strict safety; People can endure losing some recently inserted data. And most of TSDB like InfluxDB allow flushing the data delayed, and people always want to do that.

VictoriaMetrics abandoned the WAL, and keep all the tables on the disk is consistent. So that the crash won't corrupt the data on the disk.