1. I noticed that cmp.php makes a lot of "joins" on cacti tables to identify fields of launched scripts, then to put gathered data inside and generate rrd files. This at least in my case slows down cmd.php considerably. My idea is redesign cacti to use separate table per Data Input defined. Such table with name of Data Input would have columns defined in the same way as input and output fields of Data Input. For example:
Code: Select all
mysql> describe Get_SNMP_Network_Data;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ID | smallint(6) | | PRI | 0 | |
| address_ip | varchar(50) | YES | | 0 | |
| community | varchar(50) | YES | | 0 | |
| ifc_num | smallint(6) | YES | | 0 | |
| in | int(11) | YES | | 0 | |
| out | int(11) | YES | | 0 | |
+-------------+-------------+------+-----+---------+-------+
2. I noticed that cmd.exe launches rrdtool per every DS. What about using pipelining feature of rrdtool? I mean cmd.php could popen() on rrdtool at the beginning then feed opened pipe with update requests and pclose() at the end. I'm not sure how much speed gain would be in this case.
- bulek