Prometheus Metrics storage

26 views
Skip to first unread message

akshay sharma

unread,
Jun 10, 2024, 9:39:12 AMJun 10
to Prometheus Users
Hi All, 

I'm working on Prometheus performance optimization. And simultaneously, I am also going through the prometheus documentation. 

I have a fair understanding of how Prometheus processes data/samples and where it stores the data 

 Although, I have a couple of questions in my mind for which I am seeking answers.

1) Does Prometheus store the metric name every single time it fetches the data? Or does it just store the value/timestamp and soft link/link to the metric name?
ex: testing_prometheus_performace{"label1": "Value1", "label2": "Value2"}    1 1712648163950
so it stores above series all the time or value/timestamp? 


2) Can some fairly long metric names cause a memory issue? If it is storing metrics' names every single time, then will it store metrics' names, labels, values and timestamps? 

Ben Kochie

unread,
Jun 10, 2024, 9:52:14 AMJun 10
to akshay sharma, Prometheus Users
Prometheus uses an inverted index to map names to series.

I highly recommend watching this talk: https://promcon.io/2017-munich/talks/storing-16-bytes-at-scale/

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAOrgXN%2B26LDfk%2BHW%3DKQ5%2Bx8EkwRBw-HZ_pPuKOFyRU21QvXkrQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages