[INFO] Speed Boost for CMD.PHP / Increase MySQL Performance
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
[INFO] Speed Boost for CMD.PHP / Increase MySQL Performance
Speed Boost in CMD.PHP and MySQL:
Based upon two user suggestions, the following configuration changes should enhance Cacti performance.
First, if you are using CMD.PHP:
Remove your MIBS environment variable, if it is on the system. According to the user, it spead up polling significantly.
Second, if you are using MySQL 4.x, you should change your my.cnf or my.ini to include the following directives. You will need to restart MySQL to implement. This will reduce MySQL load drastically.
set-variable=key_buffer=32M
query_cache_size=64M
Also, MySQL Administrator is a great realtime tool for viewing load while polling and viewing cache and key buffer hit rates.
TheWitness
Based upon two user suggestions, the following configuration changes should enhance Cacti performance.
First, if you are using CMD.PHP:
Remove your MIBS environment variable, if it is on the system. According to the user, it spead up polling significantly.
Second, if you are using MySQL 4.x, you should change your my.cnf or my.ini to include the following directives. You will need to restart MySQL to implement. This will reduce MySQL load drastically.
set-variable=key_buffer=32M
query_cache_size=64M
Also, MySQL Administrator is a great realtime tool for viewing load while polling and viewing cache and key buffer hit rates.
TheWitness
Last edited by TheWitness on Thu Nov 25, 2004 9:12 am, edited 1 time in total.
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?
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?
-
- Posts: 38
- Joined: Mon Feb 16, 2004 2:01 pm
- Location: Westland, MI
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Not applicable to 3.x. Sorry. I suggest a meaningfull and well thought out upgrade. It significantly reduced my Disk IO and CPU (120 Devices, ~2000 Data Sources).
TheWitness
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?
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?
-
- Posts: 10
- Joined: Sun Apr 03, 2005 4:29 pm
- Location: Tigard, OR
I'd beware of setting the values that high if you're running on a machine with limited memory. For instance, the box I have cacti running on only has 256MB of Ram... using that much of it just for queryspace on MySQL might hurt it. Only way to tell is to do it, though... and report your results back here.
Just Newbie...
I'm starting to use cacti, and I was planning to install it in a win2k server, but I have 1187 Devices (most of them routers) but but no more than 3000 data sources...TheWitness wrote:Not applicable to 3.x. Sorry. I suggest a meaningfull and well thought out upgrade. It significantly reduced my Disk IO and CPU (120 Devices, ~2000 Data Sources).
TheWitness
I have php5 and mysql 4. What CPU should I use to get it working fine (and how many RAM) ? (It's a P4 2.0 with 512 enough?)
I was thinking that a linux box maybe better...
Another question... Should I put the poller to run every 10 minutes instead of 5 ? (just to give it time to finish)
Thanks in advance...
Ariel
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Ariel,
have a look at the metrics posted at http://forums.cacti.net/viewtopic.php?t=6206. Your timing will depend on the data gathering method, e.g. better if you use SNMP, slower if you use lots of scripts. Use cactid as a data gatherer.
happy "cacti"ing
Reinhard
have a look at the metrics posted at http://forums.cacti.net/viewtopic.php?t=6206. Your timing will depend on the data gathering method, e.g. better if you use SNMP, slower if you use lots of scripts. Use cactid as a data gatherer.
happy "cacti"ing
Reinhard
(Hopefully people don't mind me dredging up an old thread.)
I've been playing around with our cacti installation, using cmd.php, as cactid segfaults as soon as it reads the maximum SNMP OIDs per request, and I've not had the time to figure out why yet. I just re-compiled PHP to include php-snmp, instead of snmpget. Our polling time dropped from well over two minutes to less than thirty seconds, and the system load dropped from ~10 to >0.5 while polling.
Additionally, I'm finding that a /smaller/ number of concurrent poller processes is actually better. When using 50 processes, the total runtime was reliably around 47 seconds. Now that I've dropped it to 10 processes, we're looking at a runtime of 10 seconds. This is with 80 hosts and 1800 data sources.
Combining these two, the system load has dropped to >0.1, and CPU utilization has dropped from 100% to a maximum spike of ~25%, all while doing polling. This is on a quad 3.6GHz Xeon (yeah, a touch overkill) with 4GB RAM, running MySQL 4.1.19.
I've been playing around with our cacti installation, using cmd.php, as cactid segfaults as soon as it reads the maximum SNMP OIDs per request, and I've not had the time to figure out why yet. I just re-compiled PHP to include php-snmp, instead of snmpget. Our polling time dropped from well over two minutes to less than thirty seconds, and the system load dropped from ~10 to >0.5 while polling.
Additionally, I'm finding that a /smaller/ number of concurrent poller processes is actually better. When using 50 processes, the total runtime was reliably around 47 seconds. Now that I've dropped it to 10 processes, we're looking at a runtime of 10 seconds. This is with 80 hosts and 1800 data sources.
Combining these two, the system load has dropped to >0.1, and CPU utilization has dropped from 100% to a maximum spike of ~25%, all while doing polling. This is on a quad 3.6GHz Xeon (yeah, a touch overkill) with 4GB RAM, running MySQL 4.1.19.
I found the absolute best improvement is to use the devices actual ip address vs. fqdn:
11/02/2006 12:34:22 PM - SYSTEM STATS: Time:59.8656 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:153
11/02/2006 12:35:30 PM - SYSTEM STATS: Time:60.0798 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:37:25 PM - SYSTEM STATS: Time:62.7944 Method:cactid Processes:2 Threads:4 Hosts:6 HostsPerProcess:3 DataSources:238 RRDsProcessed:113
11/02/2006 12:38:59 PM - SYSTEM STATS: Time:56.7890 Method:cactid Processes:8 Threads:4 Hosts:6 HostsPerProcess:1 DataSources:238 RRDsProcessed:113
11/02/2006 12:40:14 PM - SYSTEM STATS: Time:62.0994 Method:cactid Processes:1 Threads:4 Hosts:6 HostsPerProcess:6 DataSources:238 RRDsProcessed:113
11/02/2006 12:42:01 PM - SYSTEM STATS: Time:55.6983 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:43:15 PM - SYSTEM STATS: Time:54.7663 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:45:49 PM - SYSTEM STATS: Time:55.7001 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:90
<---- changed to ip addressing here ---->
11/02/2006 12:48:03 PM - SYSTEM STATS: Time:6.2655 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:53:18 PM - SYSTEM STATS: Time:7.2820 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:54:32 PM - SYSTEM STATS: Time:3.2186 Method:cactid Processes:2 Threads:4 Hosts:6 HostsPerProcess:3 DataSources:238 RRDsProcessed:113
11/02/2006 12:54:45 PM - SYSTEM STATS: Time:2.1760 Method:cactid Processes:1 Threads:4 Hosts:6 HostsPerProcess:6 DataSources:238 RRDsProcessed:113
11/02/2006 12:55:02 PM - SYSTEM STATS: Time:2.2006 Method:cactid Processes:1 Threads:6 Hosts:6 HostsPerProcess:6 DataSources:238 RRDsProcessed:113
11/02/2006 12:34:22 PM - SYSTEM STATS: Time:59.8656 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:153
11/02/2006 12:35:30 PM - SYSTEM STATS: Time:60.0798 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:37:25 PM - SYSTEM STATS: Time:62.7944 Method:cactid Processes:2 Threads:4 Hosts:6 HostsPerProcess:3 DataSources:238 RRDsProcessed:113
11/02/2006 12:38:59 PM - SYSTEM STATS: Time:56.7890 Method:cactid Processes:8 Threads:4 Hosts:6 HostsPerProcess:1 DataSources:238 RRDsProcessed:113
11/02/2006 12:40:14 PM - SYSTEM STATS: Time:62.0994 Method:cactid Processes:1 Threads:4 Hosts:6 HostsPerProcess:6 DataSources:238 RRDsProcessed:113
11/02/2006 12:42:01 PM - SYSTEM STATS: Time:55.6983 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:43:15 PM - SYSTEM STATS: Time:54.7663 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:45:49 PM - SYSTEM STATS: Time:55.7001 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:90
<---- changed to ip addressing here ---->
11/02/2006 12:48:03 PM - SYSTEM STATS: Time:6.2655 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:53:18 PM - SYSTEM STATS: Time:7.2820 Method:cactid Processes:4 Threads:8 Hosts:6 HostsPerProcess:2 DataSources:238 RRDsProcessed:113
11/02/2006 12:54:32 PM - SYSTEM STATS: Time:3.2186 Method:cactid Processes:2 Threads:4 Hosts:6 HostsPerProcess:3 DataSources:238 RRDsProcessed:113
11/02/2006 12:54:45 PM - SYSTEM STATS: Time:2.1760 Method:cactid Processes:1 Threads:4 Hosts:6 HostsPerProcess:6 DataSources:238 RRDsProcessed:113
11/02/2006 12:55:02 PM - SYSTEM STATS: Time:2.2006 Method:cactid Processes:1 Threads:6 Hosts:6 HostsPerProcess:6 DataSources:238 RRDsProcessed:113
[color=green][size=84]Cacti-0.8.6i|Gentoo-2006.1|kernel-x86_64-2.6.17-hardened-r1|mysql-5.0.26|rrdtool-1.2.6|glibc-2.3.6-r4|gcc-3.4.6|net-snmp-5.2.1.2|php-5.1.6|apache-2.0.58[/size][/color]
Wow. You sure thats just not a DNS problem on your side?Suicidal wrote:I found the absolute best improvement is to use the devices actual ip address vs. fqdn:
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Small Tip to increase your CACTI Performance.
If your Poller Statistic looks like this one in attachment (always slowly increasing, without any new Data sources). Check your poller_output table !!!
And if there are any old values then delete from poller_output And after that fix Data source which is spamming this table.
Gives a lot of Performance boost
If your Poller Statistic looks like this one in attachment (always slowly increasing, without any new Data sources). Check your poller_output table !!!
And if there are any old values then delete from poller_output And after that fix Data source which is spamming this table.
Gives a lot of Performance boost
- Attachments
-
- cacti_pooler.png (50.45 KiB) Viewed 58464 times
Who is online
Users browsing this forum: No registered users and 1 guest