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
> > 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)
>
> From your other checks it suggests most is indeed cache.
>
> As with all databases lots of memory is used to hold values stored on
> disk, to speed up queries. As mentioned this cache memory is managed by
> the kernel which will use as much as is available (totally free memory
> is a waste, so it is better to use it as cache) but throw it away if the
> memory is needed for applications.
>
> Prometheus itself does need a reasonable amount of memory to hold
> recently scraped data, handle compaction and process queries. This
> memory is managed by the application, with the amount needed dependent
> on the amount of data scraped (time series & scrape interval) and the
> number & complexity of queries.
>
> Prometheus will continue to operate if there isn't much cache memory
> available, but performance will be affected at some point - disk access
> (even SSD) is generally significantly slower than memory access. Disk IO
> usage would increase as well as CPU IO time.
>
> --
> Stuart Clark
>
--
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/30000296-9997-4013-85fc-dbaef230b268o%40googlegroups.com.