Hi,Ben,many thanks, I used "prometheus_tsdb_head_series" and 
"prometheus_tsdb_head_chunks" to check my prometheus,and the results are as 
follows.But I don't think I really understand what it means.For example,how 
much memory does one serie or chunk take?Would you tell me how to 
understand the result ?Thank you very much!



在 2020年7月8日星期三 UTC+8下午4:07:00,Ben Kochie写道:
>
> 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] <javascript:>> 
> 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] <javascript:>.
>> 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/9f3bd46e-ebcb-4e22-bc1a-30bf5c2186bbo%40googlegroups.com.

Reply via email to