Local retention refers to on-disk retention. You said you set this to 2
days. The local disk retention could be 2 days or 15 days, it doesn't
contribute significantly to memory use. Only 2 hours are kept in memory.

On Tue, Apr 14, 2020 at 12:51 PM Thomas Will <[email protected]>
wrote:

> Thank you, Ben, for replying. "by local retention" I am assuming that you
> are talking about the 2hr retention in ram. How it's not gonna affect the
> memory use, as we will be storing all the metrics in ram for 2hrs. right?
>
> On Tuesday, April 14, 2020 at 4:15:12 PM UTC+5:30, Ben Kochie wrote:
>>
>> Prometheus only keeps up to 2 hours in memory. After this it is always
>> written to disk and mmaped. There are no controls for this. The local
>> retention time makes (almost) no difference to memory use.
>>
>> The only control is to reduce the metrics collected.
>>
>> On Tue, Apr 14, 2020, 12:33 Thomas Will <[email protected]> wrote:
>>
>>> Hello guys,  I am running my Prometheus in a docker container, have set
>>> my retention period to be 2days and also enabled Thanos at the back. I have
>>> two questions:-
>>>
>>> 1) For how much time Prometheus stores its metrics in ram and after that
>>> sends to the disc?
>>> 2) Is there any way to control our ram usage, like based on size or
>>> number of metrics, i.e. if ram size increases beyond a threshold, dump the
>>> data to the disc.
>>>
>>> Cheers, all.
>>> Thomas Will.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Prometheus Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/prometheus-users/1a166fbc-3c49-45b4-9dec-361f07f20172%40googlegroups.com
>>> <https://groups.google.com/d/msgid/prometheus-users/1a166fbc-3c49-45b4-9dec-361f07f20172%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/c19411f3-6b25-40af-a096-b98938d945f4%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/c19411f3-6b25-40af-a096-b98938d945f4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CABbyFmop59RWR2qwjh752kQiwzWhw4j7GscUsUA91AvXhLQGgA%40mail.gmail.com.

Reply via email to