Learn Labs
TSDB Internals

Self-test

Check your understanding of TSDB internals and capacity

Self-test9 questions

—/9
  1. Trace a sample from scrape to a compacted block. Name each structure it passes through.

  2. How does Gorilla compression get a sample down to 1-2 bytes? Which part compresses a regular scrape interval?

  3. Why does a Prometheus restart produce a gap in every graph? How do you make restarts less painful?

  4. Why does immutability of blocks make backups, retention, and long-term storage simpler?

  5. Estimate the disk needed for 400k series at a 30s interval with 30 days of retention.

  6. What dominates Prometheus's memory use? Why can RSS be much larger than the live data?

  7. Distinguish high cardinality from high churn. Give an example of each.

  8. What does sample_limit do when exceeded, and why is that the right behaviour?

  9. Design question

    At 2 a.m., Prometheus is OOM-looping after a deploy. Write the step-by-step runbook to recover it and find the cause.