Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Sun Sep 21, 2014 7:03 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: reproducible for you (poller_interval)
PostPosted: Thu May 15, 2008 10:58 am 
Offline

Joined: Mon Oct 27, 2003 9:13 am
Posts: 37
Location: Germany, Potsdam
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


Top
 Profile  
 
 Post subject: Re: reproducible for you (poller_interval)
PostPosted: Tue Aug 17, 2010 10:01 am 
Offline

Joined: Mon Oct 27, 2003 9:13 am
Posts: 37
Location: Germany, Potsdam
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 57 times
Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2010 12:51 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Please
Code:
show index from poller_item;
to find out, which indexes are defined to your poller_item table
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 19, 2010 3:51 am 
Offline

Joined: Mon Oct 27, 2003 9:13 am
Posts: 37
Location: Germany, Potsdam
gandalf wrote:
Please
Code:
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 19, 2010 7:21 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
How big is this system? How about a quick top screenshot and a
Code:
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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 19, 2010 8:00 am 
Offline

Joined: Mon Oct 27, 2003 9:13 am
Posts: 37
Location: Germany, Potsdam
TheWitness wrote:
How big is this system? How about a quick top screenshot and a
Code:
du -hs rra



Code:
2.5G


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2010 1:25 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2010 2:53 pm 
Offline

Joined: Mon Oct 27, 2003 9:13 am
Posts: 37
Location: Germany, Potsdam
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:
mysql/OS Centos5.5 Raid1 2x149GB/15K  ext3

cacti/rra          Raid1 2x149GB/15k  ext4 (defaults,noatime,nodiratime,data=writeback,commit=120)


UK


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2010 3:38 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
Hmm. Do the following:

Code:
#!/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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group