Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How much memory does Prometheus need at least? #4877

Closed
UnicornSymbol opened this Issue Nov 19, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@UnicornSymbol
Copy link

UnicornSymbol commented Nov 19, 2018

When I use 4G memory to run, prometheus2.0 memory usage has been increasing until it dies.

`- "--config.file=/etc/prometheus/prometheus.yml"

  • "--storage.tsdb.path=/prometheus"
  • "--storage.tsdb.retention=6h"
  • "--storage.tsdb.max-block-duration=1h"
  • "--web.enable-lifecycle"`
@kdada

This comment has been minimized.

Copy link
Contributor

kdada commented Nov 19, 2018

In our case, a prometheus instance with about 200 targets and 5 seconds of scrape interval, uses 4G ~ 5G memory.

What's scale of your prometheus?

@UnicornSymbol

This comment has been minimized.

Copy link
Author

UnicornSymbol commented Nov 19, 2018

No more than 100 and 30 seconds scrape interval, Why memory usage has been increasing.

@kdada

This comment has been minimized.

Copy link
Contributor

kdada commented Nov 19, 2018

Do you have some queries/alerts/rules which fetch too many metrics?

@UnicornSymbol

This comment has been minimized.

Copy link
Author

UnicornSymbol commented Nov 19, 2018

I use Prometheus to collect data and grafana to display.I'm not sure is grafana showing too many queries.Do you use grafana?

@kdada

This comment has been minimized.

Copy link
Contributor

kdada commented Nov 19, 2018

We use grafana too. Our dashboards shows metrics about 30min~6h. That means grafana will query data in the past 6h at most.

@UnicornSymbol

This comment has been minimized.

Copy link
Author

UnicornSymbol commented Nov 19, 2018

Thank you for your answer.I'll try to adjust.

@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Nov 19, 2018

Thanks for your report. It looks as if this is actually a question about usage and not development. BTW You shouldn't need to tweak the storage.tsdb.max-block-duration flag, it is only required for testing and benchmarking.

To make your question, and all replies, easier to find, we suggest you move this over to our user mailing list, which you can also search. If you prefer more interactive help, join or our IRC channel, #prometheus on irc.freenode.net. Please be aware that our IRC channel has no logs, is not searchable, and that people might not answer quickly if they are busy or asleep. If in doubt, you should choose the mailing list.

Once your questions have been answered, please add a short line pointing to relevant replies in case anyone stumbles here via a search engine in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.