8 posts tagged with "prometheus"

View All Tags

Prometheus TSDB (Part 7): Snapshot on Shutdown

Ganesh Vernekar

Ganesh Vernekar

Software Engineer @ Grafana Labs

Introduction

In part 2 we saw that TSDB uses Write-Ahead-Log (WAL) to provide durability against crashes. But it also makes restarts of Prometheus slow when you hit a decent scale because replaying Checkpoint+WAL takes time.

In this post we will understand more about a new feature introduced in Prometheus v2.30.0: taking snapshots of in-memory data during the shutdown for faster restarts by entirely skipping the WAL replay.

Prometheus TSDB (Part 5): Queries

Ganesh Vernekar

Ganesh Vernekar

Software Engineer @ Grafana Labs

Introduction

In the last four blog posts we saw the internals of how data is stored in the TSDB. It's now time to know how to query it. In this blog post we will be looking at 3 types of query that we do on the persistent blocks and briefly about the Head block.

Prometheus TSDB (Part 3): Memory Mapping of Head Chunks from Disk

Ganesh Vernekar

Ganesh Vernekar

Software Engineer @ Grafana Labs

Introduction

In the Part 1 of the TSDB blog series I mentioned that once a chunk is "full", it is flushed to the disk and memory mapped. This helps in reducing the memory footprint of the Head block and also helps speed up the WAL replay that we discussed in Part 2. We will be diving deeper into how this is designed in Prometheus in this blog post.

Prometheus TSDB (Part 1): The Head Block

Ganesh Vernekar

Ganesh Vernekar

Software Engineer @ Grafana Labs

Introduction

Though Prometheus 2.0 was launched about 3 years ago, there are not much resources to understand it's TSDB other than Fabian's blog post, which is very high level, and the docs on formats is more like a developer reference.

The Prometheus' TSDB has been attracting lots of new contributors lately and understanding it has been one of the pain points due to lack of resources. So, I plan to discuss in detail about the working of TSDB in a series of blog posts along with some references to the code for the contributors.