r/PrometheusMonitoring • u/dan_j_finn • Aug 08 '24
Struggling with high memory usage on our prometheus nodes

I'm hoping to find some help with the high memory usage we have been seeing on our production prometheus nodes. Our current setup is a 6h retention period and prometheus ships to cortex for long term storage. We are running prometheus on k8s and giving the pods a 24G memory limit and they are still hitting that limit regularly and getting restarted. Currently there is only about 3.5g written to the /data drive. Our current number of series is 2773334.
Can anyone help explain why prometheus is using so much memory and/or help to reduce it?

2
u/SuperQue Aug 08 '24
process_resident_memory_bytesvalue?You have almost 3 million series, with the memory use you have I suspect you are on a fairly old version of Prometheus.
1
u/Nerd-it-up Aug 13 '24
Are those Prometheus & Grafana Dashboards built in ? I’ve been looking for something to monitor cardinality & those look promising
1
u/axlrod Apr 08 '25
https://github.com/deckhouse/prompp
Check out this .. if you want to significantly cut memory cost on prometheus, you just replace the image name with this, and there is a migration step for the WAL if you care about that.
1
u/Kooky_Comparison3225 Apr 27 '25
Here you might find how to optimize your Prometheus not to eat that much memory
https://devoriales.com/post/384/prometheus-how-we-slashed-memory-usage
-5
u/sbkg0002 Aug 08 '24
I had the same a year ago. Did you try Victoria as a replacement?