[HOWTO] Cacti's setup for really BIG environments

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Re: [HOWTO] Cacti's setup for really BIG environments

Post by BorisL »

tosage wrote:So i done all yours advice that you explain in this topic except for the Boost plugin.
You have no Boost plugin enabled though: RRDsProcessed is zero when it is enabled.
But even then, these advices are not likely to fix your periodic cpu consuption problem, I presume the cause of that problem is outside of cacti installation.
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: [HOWTO] Cacti's setup for really BIG environments

Post by tosage »

Yep i dont have this plugin enable in my installation.
Thanks for your reply, i go search what is the reason which create their leaks...

Ps : sorry for my English, is so poor :/
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Re: [HOWTO] Cacti's setup for really BIG environments

Post by BorisL »

My patchset for 0.8.7i is located here. Mind that this patch will need some more stuff in spine(use spine/branches/0.8.7 version from svn as base) and SQL alter (adding column polling_time, see here for details).

As an additional current issue (I hope this will be fixed as errata patch for 0.8.7i) currently one need to apply this patch too.
Last edited by BorisL on Sat Jan 21, 2012 12:58 pm, edited 1 time in total.
c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: [HOWTO] Cacti's setup for really BIG environments

Post by c3226026 »

BorisL wrote:My patchset for 0.8.7i is located here. Mind that this patch will need some more stuff in spine and SQL alter (adding column polling_time, see here for details).

As an additional current issue (I hope this will be fixed as errata patch for 0.8.7i) currently one need to apply this patch too.
Hello BorisL,

Thanks for these information, I've try your 0.8.7i patch, but I've this error :

Hunk #2 FAILED at 210 1 out 7 hunk FAILED : but in my poller.php file line 210 is empy

It's normal ?

Thanks for your return
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Re: [HOWTO] Cacti's setup for really BIG environments

Post by BorisL »

c3226026 wrote: Thanks for these information, I've try your 0.8.7i patch, but I've this error :
Hunk #2 FAILED at 210 1 out 7 hunk FAILED : but in my poller.php file line 210 is empy
It's normal ?
This is not normal, I think you are trying to apply patch against non-PIA 0.8.7i distribution. Basically you need PIA in order to have BOOST plug-in up and running. Is my suggestion correct?
c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: [HOWTO] Cacti's setup for really BIG environments

Post by c3226026 »

No I use 0.8.7i-pia version, but I have always take some file on svn repository, so I think it's for that.

I've test on the "original" 0.8.7i package and all are fine (sorry :oops: )

but for your other "patch" http://bugs.cacti.net/view.php?id=2150, I don't understand what I need to do and on what file

Does I need to apply this path http://bugs.cacti.net/view.php?id=2070 on spine 0.8.7i ?

Thanks in advanced for your answer
Last edited by c3226026 on Sat Jan 21, 2012 12:57 pm, edited 1 time in total.
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Re: [HOWTO] Cacti's setup for really BIG environments

Post by BorisL »

c3226026 wrote:but for your other "patch" http://bugs.cacti.net/view.php?id=2150, I don't understand what I need to done and on what file
lib/sort.php. Remove '\' chars in explodes inside usort_data_query_index() function.
c3226026 wrote:Does I need to apply this path http://bugs.cacti.net/view.php?id=2070 on spine 0.8.7i ?
Huh, this is the correct time to fetch files from svn, not "original" version :) This is a patch against spine/branches/0.8.7
c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: [HOWTO] Cacti's setup for really BIG environments

Post by c3226026 »

Thanks for your answer, for spine 0.8.7i, I haven't see new file on svn, spine 0.8.7i is tag 0.8.7i 6972 (it's not the original version ?)

Thanks in advanced for your last confirmation.
Last edited by c3226026 on Sat Jan 21, 2012 1:12 pm, edited 1 time in total.
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Re: [HOWTO] Cacti's setup for really BIG environments

Post by BorisL »

c3226026 wrote:Thanks for your answer, for spine 0.8.7i, I haven't see new file on svn, spine 0.8.7i is tag 0.8.7i 6972 (it's not the original version ?)
As you can see in the patch, it is built against revision 6836. You may try to patch rev 6972, I expect patch to be applied cleanly.
c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: [HOWTO] Cacti's setup for really BIG environments

Post by c3226026 »

Thanks I will try it :wink:
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Re: [HOWTO] Cacti's setup for really BIG environments

Post by BorisL »

Additionally, one may try to use new php-snmp library. It can be fetched from PHP trunk, I made best efforts to make it backwards compatible downto 5.2 branch. Using patched 0.8.7i and new php-snmp library will result in significantly increased speed of SNMP reindex operations (for example, new library can make use of GET query with multiple OIDs in single query, not one-by-one)
c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: [HOWTO] Cacti's setup for really BIG environments

Post by c3226026 »

I've check svn 6972 is same than original 0.8.7i version, no diff.

I'will try your patch on it.

For php-snmp, I just need to install it, no change to do after on cacti ?


[Edit]
For spine patch, I've tested, but I cannot apply it :

patch -p1 -N < ../data_rate-17.11.2011.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: poller.h
|===================================================================
|--- poller.h (revision 6836)
|+++ poller.h (working copy)
--------------------------
File to patch:



It's probably not same file than 0.8.7h, you have applyed it on you 0.8.7i spine version ?
[/Edit]
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Re: [HOWTO] Cacti's setup for really BIG environments

Post by BorisL »

c3226026 wrote:For php-snmp, I just need to install it, no change to do after on cacti ?
You will need to restart HTTP server in order to allow php web-module load new SNMP module. Poller will hook it in automatically.
c3226026 wrote:patch -p1 -N < ../data_rate-17.11.2011.patch
There should be no -p option here. There is nothing to strip in path in patch.
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: [HOWTO] Cacti's setup for really BIG environments

Post by tosage »

Hello all,

Anybody know this packet :
To speed-up the polling process at large deployments you could apply some performance tweaks. This includes a php opcode cacher:

aptitude install php5-xcache

and replacing the current poller process cron-job with multiple parallel instances:

*/5 * * * * root cd /opt/observium/ && ./poller.php -i 8 -n 0 >> /dev/null 2>&1
*/5 * * * * root cd /opt/observium/ && ./poller.php -i 8 -n 1 >> /dev/null 2>&1
*/5 * * * * root cd /opt/observium/ && ./poller.php -i 8 -n 2 >> /dev/null 2>&1
*/5 * * * * root cd /opt/observium/ && ./poller.php -i 8 -n 3 >> /dev/null 2>&1
*/5 * * * * root cd /opt/observium/ && ./poller.php -i 8 -n 4 >> /dev/null 2>&1
*/5 * * * * root cd /opt/observium/ && ./poller.php -i 8 -n 5 >> /dev/null 2>&1
*/5 * * * * root cd /opt/observium/ && ./poller.php -i 8 -n 6 >> /dev/null 2>&1
*/5 * * * * root cd /opt/observium/ && ./poller.php -i 8 -n 7 >> /dev/null 2>&1
I view this tweak for observium, maybe useful/useless in cacti ????

Thanks for comments :)
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Re: [HOWTO] Cacti's setup for really BIG environments

Post by BorisL »

tosage wrote:I view this tweak for observium, maybe useful/useless in cacti ????
As far as I can see there are two tweaks in quotation.
First is to use xcache, php bytecode cacher. It will be userful when you have a lot of queries to your server.
Second seems to be specific to observium.

So basically these tweaks will not help cacti (unless you are suffering from php eating up your CPU compiling php code, I haven't seen such scenarios so far) to speed up.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest