Re: [prometheus-users] What is the Prometheus's memory elimination strategy?

2020-07-10 Thread 白洋洋
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 r

Re: [prometheus-users] What is the Prometheus's memory elimination strategy?

2020-07-08 Thread 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

Re: [prometheus-users] What is the Prometheus's memory elimination strategy?

2020-07-08 Thread 白洋洋
Ok, I see,Thank you very much! 在 2020年7月8日星期三 UTC+8下午3:51:18,Stuart Clark写道: > > On 2020-07-08 08:44, 白洋洋 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

Re: [prometheus-users] What is the Prometheus's memory elimination strategy?

2020-07-08 Thread Stuart Clark
On 2020-07-08 08:44, 白洋洋 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 d

Re: [prometheus-users] What is the Prometheus's memory elimination strategy?

2020-07-08 Thread 白洋洋
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?(T

Re: [prometheus-users] What is the Prometheus's memory elimination strategy?

2020-07-07 Thread 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 白洋洋 wrote: > > The picture below shows the memory that Prometheus use

[prometheus-users] What is the Prometheus's memory elimination strategy?

2020-07-07 Thread 白洋洋
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 Pro