Prometheus memory use depends on how much data you're feeding it.

Look at prometheus_tsdb_head_series
and rate(prometheus_tsdb_head_samples_appended_total[5m]).

I usually recommend planning to shard your Prometheus by namespace when the
head series is over 2 million.

On Wed, Jul 8, 2020 at 9:44 AM 白洋洋 <[email protected]> wrote:

> Ok,thank you .But the expression
> "container_memory_usage_bytes{container_name="prometheus"}", which is a
> metrics of kubernetes-cadvisor, shows the memory that Prometheus used is
> about 33G,Isn't it a little too high?Is it that most of this memory is
> cache, and we don't need to worry about it?(The memory of the computer is
> 48G)
>
> 在 2020年7月8日星期三 UTC+8下午2:56:08,Ben Kochie写道:
>>
>> Prometheus only uses what memory it needs. You can see this
>> with process_resident_memory_bytes and go_memstats_alloc_bytes. Cache
>> memory is not part of Prometheus, it is controlled by the kernel.
>>
>> On Wed, Jul 8, 2020 at 8:47 AM 白洋洋 <[email protected]> wrote:
>>
>>>
>>> The picture below shows the memory that Prometheus used.As we can
>>> see,the average memory is about 33G,and that's a lot of memory.Then I use
>>> the command "free -h" to check the memory usage.The result  is shown that
>>> the  most  memory the prometheus used is cache.Would you tell me What is
>>> the Prometheus's memory elimination strategy?Under what circumstances will
>>> Prometheus clean up the cache ?Thank you.
>>>
>>> --
>>> 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/5739771b-3d2a-4d8a-9577-c04d40d7c926o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/prometheus-users/5739771b-3d2a-4d8a-9577-c04d40d7c926o%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/4361317e-718e-4be9-bb06-4b5a21775dd1o%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/4361317e-718e-4be9-bb06-4b5a21775dd1o%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/CABbyFmphmLO9KVDr9hQG_mqe72p3LfMSEj-HU8OU2n6LBBW%3D_g%40mail.gmail.com.

Reply via email to