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

Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven ArchitectureStefan Norberg
 
Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)WSO2
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for BeginnerShahzad Masud
 
Wallix - Audit & traçabilité des comptes à privilèges
Wallix - Audit & traçabilité des comptes à privilègesWallix - Audit & traçabilité des comptes à privilèges
Wallix - Audit & traçabilité des comptes à privilègesUNIDEES Algérie
 
Event-Driven Microservices With NATS Streaming
Event-Driven Microservices With NATS StreamingEvent-Driven Microservices With NATS Streaming
Event-Driven Microservices With NATS StreamingShiju Varghese
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeFlink Forward
 
BDA302 Deep Dive on Migrating Big Data Workloads to Amazon EMR
BDA302 Deep Dive on Migrating Big Data Workloads to Amazon EMRBDA302 Deep Dive on Migrating Big Data Workloads to Amazon EMR
BDA302 Deep Dive on Migrating Big Data Workloads to Amazon EMRAmazon Web Services
 
Introducing EDB Failover Manager
Introducing EDB Failover ManagerIntroducing EDB Failover Manager
Introducing EDB Failover ManagerEDB
 
Terraform: An Overview & Introduction
Terraform: An Overview & IntroductionTerraform: An Overview & Introduction
Terraform: An Overview & IntroductionLee Trout
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusGrafana Labs
 
Introducing Confluent Cloud: Apache Kafka as a Service
Introducing Confluent Cloud: Apache Kafka as a Service Introducing Confluent Cloud: Apache Kafka as a Service
Introducing Confluent Cloud: Apache Kafka as a Service confluent
 
Getting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaGetting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaSyah Dwi Prihatmoko
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetesconfluent
 
Prometheus
PrometheusPrometheus
Prometheuswyukawa
 
Hashicorp Terraform Open Source vs Enterprise
Hashicorp Terraform Open Source vs EnterpriseHashicorp Terraform Open Source vs Enterprise
Hashicorp Terraform Open Source vs EnterpriseStenio Ferreira
 
Airflow Clustering and High Availability
Airflow Clustering and High AvailabilityAirflow Clustering and High Availability
Airflow Clustering and High AvailabilityRobert Sanders
 

What's hot (20)

Prometheus and Grafana
Prometheus and GrafanaPrometheus and Grafana
Prometheus and Grafana
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for Beginner
 
Wallix - Audit & traçabilité des comptes à privilèges
Wallix - Audit & traçabilité des comptes à privilègesWallix - Audit & traçabilité des comptes à privilèges
Wallix - Audit & traçabilité des comptes à privilèges
 
Event-Driven Microservices With NATS Streaming
Event-Driven Microservices With NATS StreamingEvent-Driven Microservices With NATS Streaming
Event-Driven Microservices With NATS Streaming
 
kafka
kafkakafka
kafka
 
The Impala Cookbook
The Impala CookbookThe Impala Cookbook
The Impala Cookbook
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
 
BDA302 Deep Dive on Migrating Big Data Workloads to Amazon EMR
BDA302 Deep Dive on Migrating Big Data Workloads to Amazon EMRBDA302 Deep Dive on Migrating Big Data Workloads to Amazon EMR
BDA302 Deep Dive on Migrating Big Data Workloads to Amazon EMR
 
Introducing EDB Failover Manager
Introducing EDB Failover ManagerIntroducing EDB Failover Manager
Introducing EDB Failover Manager
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Terraform: An Overview & Introduction
Terraform: An Overview & IntroductionTerraform: An Overview & Introduction
Terraform: An Overview & Introduction
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Introducing Confluent Cloud: Apache Kafka as a Service
Introducing Confluent Cloud: Apache Kafka as a Service Introducing Confluent Cloud: Apache Kafka as a Service
Introducing Confluent Cloud: Apache Kafka as a Service
 
Getting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaGetting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and Grafana
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetes
 
Prometheus
PrometheusPrometheus
Prometheus
 
Hashicorp Terraform Open Source vs Enterprise
Hashicorp Terraform Open Source vs EnterpriseHashicorp Terraform Open Source vs Enterprise
Hashicorp Terraform Open Source vs Enterprise
 
Airflow Clustering and High Availability
Airflow Clustering and High AvailabilityAirflow Clustering and High Availability
Airflow Clustering and High Availability
 

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
 

Similar to Prometheus – Storage (20)

Prometheus Storage
Prometheus StoragePrometheus Storage
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.
 
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
 

Recently uploaded

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
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
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 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)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
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
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 

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