reproducible for you (poller_interval)

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
bfek-18
Posts: 24
Joined: Mon Oct 27, 2003 9:13 am
Location: Germany, Potsdam

reproducible for you (poller_interval)

Post by bfek-18 »

Hallo,

after alterations of the cacti-settings,increased itself powerfully the CPU-Load and poller-runtime.
I found the settings value which produced this behavior.
It is the „poller_intervall“ field.

Here are my Testresults:

System: cacti-0.8.7b with fc8
Method:spine Processes:2 Threads:4 Hosts:715 HostsPerProcess:358 DataSources:14438 RRDsProcessed:8308


with poller_interval = 300:
echo "insert into settings (name,value) value ('poller_interval',300);"| mysql -u cacti -p -D cacti

poller.php runtime : 50-60 seconds
CPU Load : 15 % (System 5%, User 10%)


without poller_interval:
echo "delete from settings where name='poller_interval';"| mysql -u cacti -p -D cacti

poller.php runtime : 90 – 110 seconds
CPU Load : 45 % (System 15%, User 30%)


Is that a problem of my cacti installation ?
Can the problem be reproduced with you?
Simply delete the poller_interval from the Database table settings and test it.


Thank you for your help.
Uwe
bfek-18
Posts: 24
Joined: Mon Oct 27, 2003 9:13 am
Location: Germany, Potsdam

Re: reproducible for you (poller_interval)

Post by bfek-18 »

Hi,

the source of the problem I could find.

The high timeout value of the spine process are due to two mysql queries and query6 query7 caused.
You can find both of these queries in the source code of spine (poller.c).

query6="UPDATE poller_item SET rrd_next_step=rrd_next_step-300 WHERE host_id=<HOST-ID>"
query7="UPDATE poller_item SET rrd_next_step=rrd_step-300 WHERE rrd_next_step < 0 and host_id=<HOST-ID>"

Why these two queries are exactly I am not entirely clear.
They are, each host up to 5 seconds duration.

The delete of poller_interval prevented the call from query6/query7. Was not my intention.
And the burden (duration / CPU) were much smaller.
This worked well until version cact-spine-0.8.7e.

From version cacti-spine-0.8.7g were the times bad again.

Together with TheWitness I had tried to find the cause. http://forums.cacti.net/viewtopic.php?t=38045

For the version cacti-spine-0.8.7g I only have the following dirty patch.

bye
UK
Attachments
spine-0.8.7g-poller.c-timeout.patch
(399 Bytes) Downloaded 128 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please

Code: Select all

show index from poller_item;
to find out, which indexes are defined to your poller_item table
R.
bfek-18
Posts: 24
Joined: Mon Oct 27, 2003 9:13 am
Location: Germany, Potsdam

Post by bfek-18 »

gandalf wrote:Please

Code: Select all

show index from poller_item;
to find out, which indexes are defined to your poller_item table
R.
Hi,

here are the output.

mysql> show index from poller_item;
+-------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| poller_item | 0 | PRIMARY | 1 | local_data_id | A | NULL | NULL | NULL | | BTREE | |
| poller_item | 0 | PRIMARY | 2 | rrd_name | A | 21798 | NULL | NULL | | BTREE | |
| poller_item | 1 | local_data_id | 1 | local_data_id | A | NULL | NULL | NULL | | BTREE | |
| poller_item | 1 | rrd_next_step | 1 | rrd_next_step | A | NULL | NULL | NULL | | BTREE | |
| poller_item | 1 | action | 1 | action | A | NULL | NULL | NULL | | BTREE | |
+-------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+

The long runtime is to be observed only under poller.php / spine.
If I run two sql commands by hand, it does not take that long.

thx
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

How big is this system? How about a quick top screenshot and a

Code: Select all

du -hs rra
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
bfek-18
Posts: 24
Joined: Mon Oct 27, 2003 9:13 am
Location: Germany, Potsdam

Post by bfek-18 »

TheWitness wrote:How big is this system? How about a quick top screenshot and a

Code: Select all

du -hs rra

Code: Select all

2.5G
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well you provided half the information i requested anyway. Make sure your rrdfiles are on separate physical disk from the database.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
bfek-18
Posts: 24
Joined: Mon Oct 27, 2003 9:13 am
Location: Germany, Potsdam

Post by bfek-18 »

TheWitness wrote:Well you provided half the information i requested anyway. Make sure your rrdfiles are on separate physical disk from the database.

TheWitness
They are on different hard drives.

Code: Select all

mysql/OS Centos5.5 Raid1 2x149GB/15K  ext3

cacti/rra          Raid1 2x149GB/15k  ext4 (defaults,noatime,nodiratime,data=writeback,commit=120)
UK
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Hmm. Do the following:

Code: Select all

#!/bin/bash
tables=`mysql -uroot -p<password> -e "show tables in cacti" | grep -v Table`
for table in $tables;do
  mysql -uroot -p<password> -e "analyze table $table"
done
Do that once a week....

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests