Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.6k stars 397 forks source link

Increasing Proc/Threads for decrease polling time #5756

Closed frankfer01 closed 1 month ago

frankfer01 commented 1 month ago

Describe the bug

Hi, I had installed Cacti 1.2.27 using spine 1.2.25. I want to reduce the polling time increasing Proc/Threads. Using Proc/Threads=16/16 my polling time is about 58 seconds. If I increase to 32/32 I got this error: " '2024-05-23 11:00:04 - SPINE: Poller[Main Poller] PID[1851467] PT[140534884637568] ERROR: SS[9] Script Server did not start properly return message was: 'FATAL: Connection to Cacti database failed." and the pooling never end, until I change again. Cacti is running in a virtual machine with RockyLinux 9, has 32 GB of RAN and 32vCPU. What do you think is wrong? How I can reduce the polling time?

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'

  2. Click on '....'

  3. Scroll down to '....'

  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

Smartphone (please complete the following information)

Additional context

Add any other context about the problem here. poller

TheWitness commented 1 month ago

Well, what are the host polling times, and how many hosts? Is boost enabled?

TheWitness commented 1 month ago

First thing to always do is enable boost from the Settings > Performance tab. Having more procs and threads does not always mean better performance. With 196 threads on the collector side alone, your database will be overwhelmed.

For big systems I always recommend separating the database from the web server.

frankfer01 commented 1 month ago

Hi, The boost was enable, but the poling time not change(about 58 seg). This is not a big system, actually I have just 20 host. The host with more graphs has higher poling time. boost host

arno-st commented 1 month ago

What is the limitation of the number of connection allowed to your Database ? (max_connections)

frankfer01 commented 1 month ago

This is the value of max_connections: Database changed MariaDB [cactidb]> SHOW GLOBAL VARIABLES LIKE 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 1000 | +-----------------+-------+

frankfer01 commented 1 month ago

Hi, in this cacti version I did'n see the option "Number of Collection Threads" in the device edit. I changed from 1 to 8 and the polling time decrease to about 20 seconds, with the double of graphs. Thanks for all.

cacti