Score:0

Does Prometheus efficiently compress series of identical samples?

cn flag

Does Prometheus efficiently store and de-duplicate long repeats of identical sample values for a metric?

I'm working with a system where some of the inputs change at a low frequency - say every 30 minutes - but others change at a high frequency like 1/second or continuously. I need to capture high temporal resolution on the high frequency samples, and I'd like to know how Prometheus will handle the low frequency samples.

Say I have one series that changes at a 30 minute interval and another that changes 1/second. Prometheus scrapes at 1/second. So I have 600 identical samples of the slow series for each changed value.

What will Prometheus do with the identical samples? Does it just blindly store all 600 with their unique timestamps and "yup, still the same value"? Or is it smart enough to omit the duplicates and avoid storing all the pointless timestamps?

I can't find anything in the Prometheus docs that clearly explains how Prometheus handles metrics of different sample rates.

Lets say I'm scraping something where I cannot define separate scrape configs for the different metrics rates. How will Prometheus store my 600 identical metrics between value changes?

Do I need to use a recording rule to compact the metrics after collection, and delete the old ones? Say, match them using labels, and do temporal downsampling in post-processing? Or is prom smart enough to do this itself?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.