cpu utilization

21 views
Skip to first unread message

adi garg

unread,
Feb 20, 2020, 3:51:55 AM2/20/20
to Prometheus Developers
Hello experts, Can you please share some insights on what percentage of  cpu is taken by prometheus generally. And will it effect the other processes running on the system?

Regards,
Aditya Garg

Stuart Clark

unread,
Feb 20, 2020, 5:31:07 AM2/20/20
to adi garg, Prometheus Developers
That will very much depend on what you are planning on doing.

The more jobs you scrape and the shorter scrape interval or more metrics will use more cpu.

Equally more queries and more complex queries over longer time periods would use more cpu.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

adi garg

unread,
Feb 21, 2020, 12:26:10 AM2/21/20
to Prometheus Developers
Thanks Stuart. Is it possible to control prometheus once its cpu usage starts to get over and starts affecting the other processes?

Ben Kochie

unread,
Feb 21, 2020, 3:11:28 AM2/21/20
to adi garg, Prometheus Developers
Prometheus is meant to be run once to monitor many services on many nodes. In a typical non-containerized environment, people generally dedicate a node to it.

As Stuart says, it depends on your rate of ingestion. It also depends on the query and rule load. But typically you should be able handle 200,000 samples per second per CPU.

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/2d49ccba-f4e0-49db-990d-cc460bedcd56%40googlegroups.com.

adi garg

unread,
Feb 21, 2020, 3:57:43 AM2/21/20
to Prometheus Developers
Hey Ben, thanks for replying. Is there any flag in prometheus to control this CPU usage or we have to depend on node-exporter metrics only. Can you give some areas we should look into once CPU starts taking too much time for prometheus work. Like what could be the possible reasons for sudden increase?

On Friday, February 21, 2020 at 1:41:28 PM UTC+5:30, Ben Kochie wrote:
Prometheus is meant to be run once to monitor many services on many nodes. In a typical non-containerized environment, people generally dedicate a node to it.

As Stuart says, it depends on your rate of ingestion. It also depends on the query and rule load. But typically you should be able handle 200,000 samples per second per CPU.

On Fri, Feb 21, 2020 at 6:26 AM adi garg <addy1...@gmail.com> wrote:
Thanks Stuart. Is it possible to control prometheus once its cpu usage starts to get over and starts affecting the other processes?

On Thursday, February 20, 2020 at 4:01:07 PM UTC+5:30, Stuart Clark wrote:
That will very much depend on what you are planning on doing.

The more jobs you scrape and the shorter scrape interval or more metrics will use more cpu.

Equally more queries and more complex queries over longer time periods would use more cpu.

On 20 February 2020 08:51:55 GMT, adi garg <addy1...@gmail.com> wrote:
Hello experts, Can you please share some insights on what percentage of  cpu is taken by prometheus generally. And will it effect the other processes running on the system?

Regards,
Aditya Garg


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.

Stuart Clark

unread,
Feb 21, 2020, 4:10:19 AM2/21/20
to adi garg, Prometheus Developers
If you want to reduce cpu usage you can decrease the number of targets to scrape or make the scrape interval longer. Equally if the cpu is being used for queries look at recording rules and other data users.

It might help if you explain the problems you are seeing and what you are hoping to achieve? Prometheus needs a certain level of cpu, memory and disk to work so it may just be that you aren't allocating enough resources for the size of your monitoring.

Ben Kochie

unread,
Feb 21, 2020, 4:14:30 AM2/21/20
to adi garg, Prometheus Developers
No, there is no flag to control CPU use. This is generally done by using cgroups/containers or other process management. But be aware that if you restrict CPU use, Prometheus will fail to operate correctly.

You can use CPU profiling to find out what is using CPU time.


What is "too much"? How big is your environment? Without more information, it's impossible to know.

To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/a3615bbc-fb26-473d-9ffe-d84b8ce35a7b%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages