Lifecycle of a Sample in the Prometheus TSDB

Wednesday, December 07, 2022 - 1:30 pm2:30 pm AEDT

Ganesh Vernekar, Grafana Labs

Abstract: 

Prometheus is the leading open-source metrics monitoring solution. Prometheus 2.x contains a highly optimised Time Series Database (TSDB). It has ACID compliance and works efficiently with 100s of millions of time series on a single node. On top of its code base, Cortex, Thanos and Mimir have implemented distributed TSDBs.

The Prometheus TSDB has many components that make this all possible—an in-memory database, a Write-Ahead Log (WAL) for durability, memory-mapping of data from disk, persistent immutable data blocks with highly optimised inverted indices, and various techniques of maintaining this data in the background.

This talk will take you through the entire lifecycle of a time series sample (timestamp int64, value float64) starting from the point it enters the Prometheus TSDB's in-memory database until it gets deleted from the persistent blocks according to the retention policies.

Ganesh Vernekar, Grafana Labs

Ganesh has been contributing to Prometheus for nearly 5 years and is a Prometheus team member and maintainer of its Time Series Database (TSDB). He is currently working on the new native histograms in Prometheus. He has also contributed to Cortex, Grafana Mimir, and Grafana.

Open Access Media

USENIX is committed to Open Access to the research presented at our events. Papers and proceedings are freely available to everyone once the event begins. Any video, audio, and/or slides that are posted after the event are also free and open to everyone. Support USENIX and our commitment to Open Access.

BibTeX
@conference {284883,
author = {Ganesh Vernekar},
title = {Lifecycle of a Sample in the Prometheus {TSDB}},
year = {2022},
address = {Sydney},
publisher = {USENIX Association},
month = dec
}

Presentation Video