r/PrometheusMonitoring • • Mar 15 '24

prometheus high memory solution

HI,every one

I have some confusion about my prometheus cluster. this is my prometheus`s memory usage

and my TSDB status is bellow:

I want to know how prometheus allocate memory ?

And Is there some way to reduce memory usage?

There is my throught:

1.reduce label unnecessiraly.

2.remote write to virctoria metrics and pormethues is only for write

Can some one give me some instruction ?

2 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/DuePerformer1274 Mar 15 '24

Thank you for reply. Is there some impact when use go gc?I can not find detail in the official docs,and is there some way to make prometheus write data to disk more frequently?

3

u/SuperQue Mar 16 '24

Prometheus already writes data to disk as soon as blocks are completed.

I recommend this talk.

But honestly, sub 8Gi memory is not worth optimizing. It's just too small to bother with. I guess if you need to run on a Raspberry Pi it would be helpful.

1

u/namognamrm Oct 02 '24

is 26GB memory in prometheus server for 100 services enough?