How can I limit the memory usage with prometheus 2.0?

1,869 views
Skip to first unread message

wl317...@gmail.com

unread,
Nov 20, 2017, 4:37:55 AM11/20/17
to Prometheus Users
I can use '--storage.local.memory-chunks' to limit the memory usage when prometheus 1.X. But how can I have a similar effect with prometheus 2.0?
Thank you.

Ben Kochie

unread,
Nov 20, 2017, 4:56:46 AM11/20/17
to wl317...@gmail.com, Prometheus Users
This is no longer necessary, as Prometheus 2.0 uses the OS page cache for data.  It will only use as much memory as it needs to operate.

On Mon, Nov 20, 2017 at 10:37 AM, <wl317...@gmail.com> wrote:
I can use '--storage.local.memory-chunks' to limit the memory usage when prometheus 1.X. But how can I have a similar effect with prometheus 2.0?
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 prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/90bf2e0f-b54f-449c-99ad-939cb132e720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

wl317...@gmail.com

unread,
Nov 20, 2017, 5:19:31 AM11/20/17
to Prometheus Users
Oh, but does it ajust memory usage if I collect large amount of series? Won't it run out of memory?

在 2017年11月20日星期一 UTC+8下午5:56:46,Ben Kochie写道:
This is no longer necessary, as Prometheus 2.0 uses the OS page cache for data.  It will only use as much memory as it needs to operate.
On Mon, Nov 20, 2017 at 10:37 AM, <wl317...@gmail.com> wrote:
I can use '--storage.local.memory-chunks' to limit the memory usage when prometheus 1.X. But how can I have a similar effect with prometheus 2.0?
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 prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.

Ben Kochie

unread,
Nov 20, 2017, 8:06:02 AM11/20/17
to wl317...@gmail.com, Prometheus Users
Yes, it will grow automatically as you collect more data.  The good news is the memory use is far efficient than 1.x.  The amount needed to collect more data is minimal.

There is some extra memory needed if you do a large amount of queries, or queries that require a large amount of data.

You will want to monitor the memory use of the Prometheus process (process_resident_memory_bytes) and how much page cache the node has left (node_exporter, node_memory_Cached).


To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/0de31ab6-dab2-478c-9165-73e3f8ce73bc%40googlegroups.com.

wl317...@gmail.com

unread,
Nov 20, 2017, 8:33:54 PM11/20/17
to Prometheus Users
Oh, thank you for your explaination.

在 2017年11月20日星期一 UTC+8下午9:06:02,Ben Kochie写道:
Yes, it will grow automatically as you collect more data.  The good news is the memory use is far efficient than 1.x.  The amount needed to collect more data is minimal.

There is some extra memory needed if you do a large amount of queries, or queries that require a large amount of data.

You will want to monitor the memory use of the Prometheus process (process_resident_memory_bytes) and how much page cache the node has left (node_exporter, node_memory_Cached).
On Mon, Nov 20, 2017 at 11:19 AM, <wl317...@gmail.com> wrote:
Oh, but does it ajust memory usage if I collect large amount of series? Won't it run out of memory?

在 2017年11月20日星期一 UTC+8下午5:56:46,Ben Kochie写道:
This is no longer necessary, as Prometheus 2.0 uses the OS page cache for data.  It will only use as much memory as it needs to operate.

On Mon, Nov 20, 2017 at 10:37 AM, <wl317...@gmail.com> wrote:
I can use '--storage.local.memory-chunks' to limit the memory usage when prometheus 1.X. But how can I have a similar effect with prometheus 2.0?
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 prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/90bf2e0f-b54f-449c-99ad-939cb132e720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages