SlideShare a Scribd company logo
1 of 24
Download to read offline
Time Series in Prometheus
Fabian Reinartz – Engineer, SoundCloud Ltd.
prometheus.io
...
http_requests_total{status="200",method="GET"} @1434317560938 94355
http_requests_total{status="200",method="GET"} @1434317561287 94934
http_requests_total{status="200",method="GET"} @1434317562344 96483
http_requests_total{status="404",method="GET"} @1434317560938 38473
http_requests_total{status="404",method="GET"} @1434317561249 38544
http_requests_total{status="404",method="GET"} @1434317562588 38663
http_requests_total{status="200",method="POST"} @1434317560885 4748
http_requests_total{status="200",method="POST"} @1434317561483 4795
http_requests_total{status="200",method="POST"} @1434317562589 4833
http_requests_total{status="404",method="POST"} @1434317560939 122
...
Prometheus Metrics
Metric name Labels Timestamp Sample Value
● 1 million time series
● 10 second sample resolution
● 64bit timestamp + 64bit value
Requirements
100,000 samples/sec
time [~weeks]
series
[~millions]
Writes
The Fundamental Problem
Orthogonal write and read patterns.
Reads
...
http_requests_total{status="200",method="GET"} @1434317560938 94355
http_requests_total{status="200",method="GET"} @1434317561287 94934
http_requests_total{status="200",method="GET"} @1434317562344 96483
http_requests_total{status="404",method="GET"} @1434317560938 38473
http_requests_total{status="404",method="GET"} @1434317561249 38544
http_requests_total{status="404",method="GET"} @1434317562588 38663
http_requests_total{status="200",method="POST"} @1434317560885 4748
http_requests_total{status="200",method="POST"} @1434317561483 4795
http_requests_total{status="200",method="POST"} @1434317562589 4833
http_requests_total{status="404",method="POST"} @1434317560939 122
...
Prometheus Metrics
Key-Value store (with BigTable semantics) seems suitable.
Metric name Labels Timestamp Sample Value
VALUEKEY
Ingestion
PromQL
Storage
in-memory data
append(series, time, value)
series iterators
HDD / SSD
LevelDB
Encode
Decode
Compress Decompress
http_requests_total{status="200",method="GET"}
Prometheus Metrics
Metric name Labels
{__name__="http_requests_total",status="200",method="GET"}
Labels
Prometheus Metrics
Learning the hard way
__name__ = http_requests_total
status = 200
method = GET
fnv(sort( )
fnv( __name__ = http_requests_total )
fnv( status = 200 )
fnv( method = GET )
⊕
⊕
1KB chunks
chunk in memory
[complete and immutable]
head chunk
[incomplete]
Sample
Ingestion
append(series, time, value)
memory
disk
evictable chunks (LRU)
chunk on disk
[complete and immutable]
PromQL
series iterator
one file per time series
series hash:
Series maintenance
memory
disk
older than retention time
Chunk preloading
memory
disk
PromQL
series iterator
basetime
Anatomy of a chunk [v0]5bytesheader
basevalue
valuetime
valuetime
valuetime
valuetime
... (one per timestamp)
... (one per value)
1000000 1441558420098
1001050 1441558432221
1002040 1441558444311
1002040
1441558444311
1000000
1441558420098
1001050
1441558432221
basetime
Anatomy of a chunk [v1]5bytesheader
basevalue
valuetime
valuetime
valuetime
valuetime
... (one per timestamp)
... (one per value)
1000000 1441558420098
1050 12123
2040 24213
3100 36313
4250 48500
1002040
1441558444311
1000000
1441558420098
1001050
1441558432221
+12123
+1050
+12090
+1000
basetime
Anatomy of a chunk [v2]5bytesheader
basevalue
valuetime
valuetime
valuetime
valuetime
... (one per timestamp)
... (one per value)
1002040
1441558444311
1000000
1441558420098
1001050
1441558432221
1000000 1441558420098
1050 12123
-60 -33
-50 -56
+50 -8
+12123
+1050
+12090
+1000
basetime
Anatomy of a chunk [v2]5bytesheader
basevalue
valuetime
valuetime
valuetime
valuetime
... (one per timestamp)
... (one per value)
13:14 < nostrovsk> Hey guys, Looking for a sanity check here
13:15 < nostrovsk> 500 machines per server, each running node and jmx exporters, for 1 week is
only 30gb of data?
13:36 <@ bbrazil> what's your scrape rate and how heavy are those jmx exporters?
13:37 <@ bbrazil> doesn't sound implausible to me
13:42 <@ bbrazil> we're 25GB/two weeks with ~5k samples/s
13:45 <@ beorn7> Compression, it works... ;)
13:53 < fish_> beorn7: nothing says better 'good job' than people coming to this channel
because they can't believe that things are soo good :)
rate(prometheus_local_storage_ingested_samples_total[1m])
Bjoern Rabenstein
Brian Brazil
Julius Volz
Matt Proud
Countless community contributors
Alphabetical Thanks
Checkpointing
On shutdown and regularly to limit data loss in case of a crash.
memory
disk
checkpoint file
Prometheus – Storage

More Related Content

What's hot

Prometheus - basics
Prometheus - basicsPrometheus - basics
Prometheus - basicsJuraj Hantak
 
Prometheus
PrometheusPrometheus
Prometheuswyukawa
 
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...InfluxData
 
Kafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityKafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityJean-Paul Azar
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Henning Jacobs
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusGrafana Labs
 
Monitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusMonitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusChandresh Pancholi
 
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)Lee Myring
 
Apache Kafka as Data Hub for Crypto, NFT, Metaverse (Beyond the Buzz!)
Apache Kafka as Data Hub for Crypto, NFT, Metaverse (Beyond the Buzz!)Apache Kafka as Data Hub for Crypto, NFT, Metaverse (Beyond the Buzz!)
Apache Kafka as Data Hub for Crypto, NFT, Metaverse (Beyond the Buzz!)Kai Wähner
 
Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips confluent
 
Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...LibbySchulze
 
Stream processing using Kafka
Stream processing using KafkaStream processing using Kafka
Stream processing using KafkaKnoldus Inc.
 
What's New In Apache CloudStack 4.17
What's New In Apache CloudStack 4.17What's New In Apache CloudStack 4.17
What's New In Apache CloudStack 4.17ShapeBlue
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With PrometheusKnoldus Inc.
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersSATOSHI TAGOMORI
 
Hashicorp Vault Open Source vs Enterprise
Hashicorp Vault Open Source vs EnterpriseHashicorp Vault Open Source vs Enterprise
Hashicorp Vault Open Source vs EnterpriseStenio Ferreira
 

What's hot (20)

Prometheus - basics
Prometheus - basicsPrometheus - basics
Prometheus - basics
 
Thanos - Prometheus on Scale
Thanos - Prometheus on ScaleThanos - Prometheus on Scale
Thanos - Prometheus on Scale
 
Prometheus
PrometheusPrometheus
Prometheus
 
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
 
Kafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityKafka Tutorial: Kafka Security
Kafka Tutorial: Kafka Security
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
HashiCorp's Vault - The Examples
HashiCorp's Vault - The ExamplesHashiCorp's Vault - The Examples
HashiCorp's Vault - The Examples
 
Monitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusMonitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheus
 
Prometheus and Grafana
Prometheus and GrafanaPrometheus and Grafana
Prometheus and Grafana
 
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
 
Apache Kafka as Data Hub for Crypto, NFT, Metaverse (Beyond the Buzz!)
Apache Kafka as Data Hub for Crypto, NFT, Metaverse (Beyond the Buzz!)Apache Kafka as Data Hub for Crypto, NFT, Metaverse (Beyond the Buzz!)
Apache Kafka as Data Hub for Crypto, NFT, Metaverse (Beyond the Buzz!)
 
Grafana
GrafanaGrafana
Grafana
 
Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips
 
Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...
 
Stream processing using Kafka
Stream processing using KafkaStream processing using Kafka
Stream processing using Kafka
 
What's New In Apache CloudStack 4.17
What's New In Apache CloudStack 4.17What's New In Apache CloudStack 4.17
What's New In Apache CloudStack 4.17
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and Containers
 
Hashicorp Vault Open Source vs Enterprise
Hashicorp Vault Open Source vs EnterpriseHashicorp Vault Open Source vs Enterprise
Hashicorp Vault Open Source vs Enterprise
 

Similar to Prometheus – Storage

Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.David Tollmyr
 
DB2 Workload Manager Histograms
DB2 Workload Manager HistogramsDB2 Workload Manager Histograms
DB2 Workload Manager HistogramsKeith McDonald
 
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupДоклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupBadoo Development
 
Distributed load testing with K6 - NDC London 2024
Distributed load testing with K6 - NDC London 2024Distributed load testing with K6 - NDC London 2024
Distributed load testing with K6 - NDC London 2024Thijs Feryn
 
Distributed Load Testing with k6 - DevOps Barcelona
Distributed Load Testing with k6 - DevOps BarcelonaDistributed Load Testing with k6 - DevOps Barcelona
Distributed Load Testing with k6 - DevOps BarcelonaThijs Feryn
 
Data Wars: The Bloody Enterprise strikes back
Data Wars: The Bloody Enterprise strikes backData Wars: The Bloody Enterprise strikes back
Data Wars: The Bloody Enterprise strikes backVictor_Cr
 
Chapter 3 -Built-in Matlab Functions
Chapter 3 -Built-in Matlab FunctionsChapter 3 -Built-in Matlab Functions
Chapter 3 -Built-in Matlab FunctionsSiva Gopal
 
Troubleshooting JIRA & Confluence
Troubleshooting JIRA & ConfluenceTroubleshooting JIRA & Confluence
Troubleshooting JIRA & ConfluenceAtlassian
 
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...Docker, Inc.
 
An implementation of Jan Aerts' LocusTree
An implementation of Jan Aerts' LocusTreeAn implementation of Jan Aerts' LocusTree
An implementation of Jan Aerts' LocusTreePierre Lindenbaum
 
Bayside pv gearhead_brochure
Bayside pv gearhead_brochureBayside pv gearhead_brochure
Bayside pv gearhead_brochureElectromate
 
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...Yauheni Akhotnikau
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
Monitoring your Application in Kubernetes with Prometheus
Monitoring your Application in Kubernetes with Prometheus Monitoring your Application in Kubernetes with Prometheus
Monitoring your Application in Kubernetes with Prometheus Weaveworks
 
Event-Driven Microservices: Back to the Basics
Event-Driven Microservices: Back to the BasicsEvent-Driven Microservices: Back to the Basics
Event-Driven Microservices: Back to the BasicsHostedbyConfluent
 
Distributed load testing with k6
Distributed load testing with k6Distributed load testing with k6
Distributed load testing with k6Thijs Feryn
 

Similar to Prometheus – Storage (20)

Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.
 
DB2 Workload Manager Histograms
DB2 Workload Manager HistogramsDB2 Workload Manager Histograms
DB2 Workload Manager Histograms
 
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupДоклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
 
Distributed load testing with K6 - NDC London 2024
Distributed load testing with K6 - NDC London 2024Distributed load testing with K6 - NDC London 2024
Distributed load testing with K6 - NDC London 2024
 
Distributed Load Testing with k6 - DevOps Barcelona
Distributed Load Testing with k6 - DevOps BarcelonaDistributed Load Testing with k6 - DevOps Barcelona
Distributed Load Testing with k6 - DevOps Barcelona
 
Data Wars: The Bloody Enterprise strikes back
Data Wars: The Bloody Enterprise strikes backData Wars: The Bloody Enterprise strikes back
Data Wars: The Bloody Enterprise strikes back
 
Chapter 3 -Built-in Matlab Functions
Chapter 3 -Built-in Matlab FunctionsChapter 3 -Built-in Matlab Functions
Chapter 3 -Built-in Matlab Functions
 
Troubleshooting JIRA & Confluence
Troubleshooting JIRA & ConfluenceTroubleshooting JIRA & Confluence
Troubleshooting JIRA & Confluence
 
Czzawk
CzzawkCzzawk
Czzawk
 
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
 
Debugging TV Frame 0x24
Debugging TV Frame 0x24Debugging TV Frame 0x24
Debugging TV Frame 0x24
 
An implementation of Jan Aerts' LocusTree
An implementation of Jan Aerts' LocusTreeAn implementation of Jan Aerts' LocusTree
An implementation of Jan Aerts' LocusTree
 
Las tripas de un sistema solr
Las tripas de un sistema solrLas tripas de un sistema solr
Las tripas de un sistema solr
 
Bayside pv gearhead_brochure
Bayside pv gearhead_brochureBayside pv gearhead_brochure
Bayside pv gearhead_brochure
 
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
Monitoring your Application in Kubernetes with Prometheus
Monitoring your Application in Kubernetes with Prometheus Monitoring your Application in Kubernetes with Prometheus
Monitoring your Application in Kubernetes with Prometheus
 
Event-Driven Microservices: Back to the Basics
Event-Driven Microservices: Back to the BasicsEvent-Driven Microservices: Back to the Basics
Event-Driven Microservices: Back to the Basics
 
Querying solr
Querying solrQuerying solr
Querying solr
 
Distributed load testing with k6
Distributed load testing with k6Distributed load testing with k6
Distributed load testing with k6
 

Recently uploaded

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

Prometheus – Storage

  • 1. Time Series in Prometheus Fabian Reinartz – Engineer, SoundCloud Ltd.
  • 3.
  • 4. ... http_requests_total{status="200",method="GET"} @1434317560938 94355 http_requests_total{status="200",method="GET"} @1434317561287 94934 http_requests_total{status="200",method="GET"} @1434317562344 96483 http_requests_total{status="404",method="GET"} @1434317560938 38473 http_requests_total{status="404",method="GET"} @1434317561249 38544 http_requests_total{status="404",method="GET"} @1434317562588 38663 http_requests_total{status="200",method="POST"} @1434317560885 4748 http_requests_total{status="200",method="POST"} @1434317561483 4795 http_requests_total{status="200",method="POST"} @1434317562589 4833 http_requests_total{status="404",method="POST"} @1434317560939 122 ... Prometheus Metrics Metric name Labels Timestamp Sample Value
  • 5. ● 1 million time series ● 10 second sample resolution ● 64bit timestamp + 64bit value Requirements 100,000 samples/sec
  • 6. time [~weeks] series [~millions] Writes The Fundamental Problem Orthogonal write and read patterns. Reads
  • 7. ... http_requests_total{status="200",method="GET"} @1434317560938 94355 http_requests_total{status="200",method="GET"} @1434317561287 94934 http_requests_total{status="200",method="GET"} @1434317562344 96483 http_requests_total{status="404",method="GET"} @1434317560938 38473 http_requests_total{status="404",method="GET"} @1434317561249 38544 http_requests_total{status="404",method="GET"} @1434317562588 38663 http_requests_total{status="200",method="POST"} @1434317560885 4748 http_requests_total{status="200",method="POST"} @1434317561483 4795 http_requests_total{status="200",method="POST"} @1434317562589 4833 http_requests_total{status="404",method="POST"} @1434317560939 122 ... Prometheus Metrics Key-Value store (with BigTable semantics) seems suitable. Metric name Labels Timestamp Sample Value VALUEKEY
  • 8.
  • 9. Ingestion PromQL Storage in-memory data append(series, time, value) series iterators HDD / SSD LevelDB Encode Decode Compress Decompress
  • 10.
  • 11. http_requests_total{status="200",method="GET"} Prometheus Metrics Metric name Labels {__name__="http_requests_total",status="200",method="GET"} Labels
  • 12. Prometheus Metrics Learning the hard way __name__ = http_requests_total status = 200 method = GET fnv(sort( ) fnv( __name__ = http_requests_total ) fnv( status = 200 ) fnv( method = GET ) ⊕ ⊕
  • 13. 1KB chunks chunk in memory [complete and immutable] head chunk [incomplete] Sample Ingestion append(series, time, value) memory disk evictable chunks (LRU) chunk on disk [complete and immutable] PromQL series iterator one file per time series series hash:
  • 16. basetime Anatomy of a chunk [v0]5bytesheader basevalue valuetime valuetime valuetime valuetime ... (one per timestamp) ... (one per value) 1000000 1441558420098 1001050 1441558432221 1002040 1441558444311 1002040 1441558444311 1000000 1441558420098 1001050 1441558432221
  • 17. basetime Anatomy of a chunk [v1]5bytesheader basevalue valuetime valuetime valuetime valuetime ... (one per timestamp) ... (one per value) 1000000 1441558420098 1050 12123 2040 24213 3100 36313 4250 48500 1002040 1441558444311 1000000 1441558420098 1001050 1441558432221 +12123 +1050 +12090 +1000
  • 18. basetime Anatomy of a chunk [v2]5bytesheader basevalue valuetime valuetime valuetime valuetime ... (one per timestamp) ... (one per value) 1002040 1441558444311 1000000 1441558420098 1001050 1441558432221 1000000 1441558420098 1050 12123 -60 -33 -50 -56 +50 -8 +12123 +1050 +12090 +1000
  • 19. basetime Anatomy of a chunk [v2]5bytesheader basevalue valuetime valuetime valuetime valuetime ... (one per timestamp) ... (one per value) 13:14 < nostrovsk> Hey guys, Looking for a sanity check here 13:15 < nostrovsk> 500 machines per server, each running node and jmx exporters, for 1 week is only 30gb of data? 13:36 <@ bbrazil> what's your scrape rate and how heavy are those jmx exporters? 13:37 <@ bbrazil> doesn't sound implausible to me 13:42 <@ bbrazil> we're 25GB/two weeks with ~5k samples/s 13:45 <@ beorn7> Compression, it works... ;) 13:53 < fish_> beorn7: nothing says better 'good job' than people coming to this channel because they can't believe that things are soo good :)
  • 20.
  • 22. Bjoern Rabenstein Brian Brazil Julius Volz Matt Proud Countless community contributors Alphabetical Thanks
  • 23. Checkpointing On shutdown and regularly to limit data loss in case of a crash. memory disk checkpoint file