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 upHigh CPU and memory in Prometheus 2.3.2 #5301
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I would recommend upgrading to a more current release. There has been a lot of performance and bug fixes since 2.3.2. I'm not sure where you're getting this data, but you might want to look at Also, please include the queries used for included graphs. Without the query we have no idea what the graphs mean. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Based on the graph, it looks like whatever is producing the other metric data is reporting false information. |
This comment has been minimized.
This comment has been minimized.
|
@SuperQ What do you mean by other metric data? The difference between OS memory of 450MB and prom heap pprof of 120Mb? |
This comment has been minimized.
This comment has been minimized.
|
No, the CPU spikes seem non-existent in the Prometheus direct instrumentation. I'm not sure where |
This comment has been minimized.
This comment has been minimized.
|
The daemon_resource_utilization is similar to the output of "top" on Linux shell, done for each daemon running and I am seeing Prometheus spiking to above 100% every 1-3minutes. |
This comment has been minimized.
This comment has been minimized.
|
Prometheus CPU depends on what queries are being performed. The average CPU use seems to be about 10% of 1 core. I don't see an actual issue here, other than "it's using resources". |
This comment has been minimized.
This comment has been minimized.
|
As for the memory issue, can you please share the results of the query for |
This comment has been minimized.
This comment has been minimized.
|
Okay, could the CPU spike that we see in "top" be the Go Garbage collector? |
This comment has been minimized.
This comment has been minimized.
|
Will post the result of query "process_resident_memory_bytes" shortly |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Closing since the discussion also happens on the mailing list (here) and there's no evidence of a problem. |





anumercian commentedMar 4, 2019
•
edited
Proposal
Use case. Why is this important?
Facing high CPU and memory usage of Prometheus at Scale.
Bug Report
What did you do?
Created 126-130 time series and ran it for 2-3 days.
What did you expect to see?
Prometheus running at normal CPU and memory.
What did you see instead? Under which circumstances?

Prometheus is having CPU spikes every 1 minute for about 5sec to 100%.
On an average it seems like CPU is having high CPU throughout:

The memory via pprof is about 120Mb but via OS (/proc) its about 450Mb
Environment
System information:
insert output of
uname -srmherePrometheus version:
insert output of
prometheus --versionherePrometheus 2.3.2
Alertmanager version:
insert output of
alertmanager --versionhere (if relevant to the issue)Prometheus configuration file:
global:
scrape_interval: 15s
evaluation_interval: 5s
external_labels:
monitor: 'codelab-monitor'
rule_files:
scrape_configs:
job_name: 'prometheus'
scrape_interval: 5s
static_configs:
alerting:
alertmanagers: