CPU Usage 90-100%

Hello All!

Thank You for viewing my topic!
I’ve some quesiton to You guys related to CPU Usage.
I have fresh installation of LibreNMS on Virtual environment (VMware) which is based on CPU: Intel(R) Xeon(R) Gold 6246R CPU @ 3.40GHz (4vCPU Installed for that VM) and 32GB of RAM Memory.
339 Devices added.

As You can see, CPU usage is really high on every pooling time (it’s configured defualty for 300sec), is there any way to reduce CPU consumption for this VM?

I’ll be really apprecaite for any solution!

Thanks!

Polller

Ubuntu CPU Usage

VMware CPU Usage (VM)


====================================
Component | Version
--------- | -------
LibreNMS | 21.3.0-13-gcac7bfc59
DB Schema | 2021_03_17_160729_service_templates_cleanup (201)
PHP | 7.4.3
Python | 3.8.5
MySQL | 10.3.25-MariaDB-0ubuntu0.20.04.1
RRDTool | 1.7.2
SNMP | NET-SNMP 5.8
====================================

[OK]    Composer Version: 2.0.11
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
librenms@librenms2:~$

Have you configured rrdcached for your installation?

https://docs.librenms.org/Extensions/RRDCached/

https://docs.librenms.org/Support/Performance/

If you don’t want it to be so spikey, lower the poller thread count. Increasing it too high will cause the issue you have outlined.

3 Likes

@alanbboyd I’ve configured it few hours ago.

The result is seems to be worst than without rrdcached.

You are talking about this value?

Yes. I think the rule of thumb used to be go no higher than 2x CPU count, so try lowering yours to 8 in the first instance. I’ve stuck to that and it’s worked well for me.

1 Like

@alanbboyd @murrant

Yayy! It looks that works fine!
Thanks a lotttt Gentelmen!

What is possible influence of reducing these threads?

Slower polling times, as long as your total polling time stays under 5min, youre fine either way

1 Like

For sure?
I’ve change 16 threads for 8 and it seems that pooling time is faster than before…
rrdcached could reduce pooling time?

well if you dont have enough cores it could have the opposite effect yes, “it depends”

Starting too many threads at the same time means they will all wait (and possibly stall) at the RRD update or at the SQL update. So yes, sometimes reducing the number of threads can lower the total amount of time spent.
A slow HDD vs a fast SSD would also influence this independently of the CPU.

So the comfortable number of threads is the amount that covers your polls in your polling interval and give the lower CPU usage. You’ll have to test.

1 Like

And don’t forget that LibreNMS will always poll itself during the high CPU usage part of it’s interval. So you can’t trust the CPU value LibreNMS reports for itself, it will always be more than the real average usage of the CPU. You are right to look at the hypervisor stats.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.