Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upheavy memory usage, keep getting OOM killed with data scrape only #4553
Comments
This comment has been minimized.
This comment has been minimized.
|
Thanks for your report. It looks as if this is actually a question about usage and not development. If I read correctly, Prometheus is using roughly 10GB of memory for 1.5M series in the head. This is in line with the empirical rule of requiring 8kB per active serie. Notet that the rule doesn't take into account query usage. I'm closing it for now. If you have further questions, please use our user mailing list, which you can also search. |
simonpasquier
closed this
Aug 28, 2018
This comment has been minimized.
This comment has been minimized.
|
@simonpasquier I don't think this is just usage question, please consider reopen my issue
|
This comment has been minimized.
This comment has been minimized.
|
@Ehekatl What do you mean the memory usage dropped for 4 targets --> 9 targets? From what I see, a compaction was triggered which wrote a bunch of data to disk causing memory to drop. Due to the architecture of the new TSDB, we keep 2hours of data in-memory and then compact it to disk. You could read about it here: https://fabxc.org/tsdb/ As @simonpasquier mentioned, I too think 10G for 1.5Mil series is too low and you should consider looking at bigger machines. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |

Ehekatl commentedAug 28, 2018
I'm running a prom instance with average of 100K ingested samples/s, 7 days rotation period, scrape from 4 targets every 15s, even without any query/rules running it still use 50% of system memory upon start, and memory usage is keep climbing till it get killed by OS.
Is this memory usage normal? How can I limit total memory consumed by prom (or make gc more often)?
Environment
System information:
Linux 4.4.0-31-generic x86_64
Prometheus version:
prometheus, version 2.3.2 (branch: HEAD, revision: 71af5e2)
build user: root@5258e0bd9cc1
build date: 20180712-14:02:52
go version: go1.10.3
Sample of heap file:
heap.pprof.zip