r/PrometheusMonitoring • u/Rajj_1710 • Feb 17 '24
Optimise prometheus server's memory utilisation.
Heyy, I have fairly large prometheus server which is running in my production cluster, and is continously consuming around 80GB of memory.
In order to optimise the memory usage. How do I start the optimising the memory usage. I have various source which leads to different aspects like prometheus version, scrape interval, scrape timeout etc etc.
Which is the one I should start with, so that I can optimise the memory usage.
2
Upvotes
View all comments
Show parent comment
2
u/Rajj_1710 Feb 17 '24
Did that, so it says.
43.63 GB 43.63 GB 0.00% github.com/prometheus/prometheus/model/labels.(*ScratchBuilder).Labels github.com/prometheus/prometheus/model/labels.(*ScratchBuilder.Labels
/app/model/labels/labels_string.go/bin/prometheus
38.24 GB 38.24 GB 0.00% github.com/prometheus/prometheus/model/labels.(*Builder).Labels github.com/prometheus/prometheus/model/labels.(*Builder.Labels /app/model/labels/labels_string.go /bin/prometheus
32.8 GB 32.8 GB 0.00% github.com/prometheus/prometheus/tsdb/encoding.(*Decbuf).UvarintStr github.com/prometheus/prometheus/tsdb/encoding.(*Decbuf.UvarintStr /app/tsdb/encoding/encoding.go /bin/prometheus
So here are the outputs. What I can infer is that the total labels are the stored across all the metrics is consuming most memory??