You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Poller items are evaluated too quickly when mixed polling cycles are used #4147
I have an issue with a customers Cacti system which was upgraded from 0.8x to Cacti 1.2.16 on Ubuntu.
Data is being polled every 5-Minute. As a preparation for a mixed 1-minute and 5-minute polling the polling interval and cron entry are being changed from 5/5 minutes to 1/1 minute intervals. Afterwards the poller rebuild is being executed to the poller_item is aware of the different setup.
What I expect to see in the table is a nice distribution of the datasources to the different steps. Which is also done correctly:
Now it seems like after the polling run, the table gets re-organized, but instead of doing a kind of round-robin (rrd_next_step 60 becomes 0, rrd_next_step 120 becomes 60 ...) it make a complete new combination:
Please see the attached file for some more polling cycles.
Nor sure what the reason for this is and cannot remember having seen this behaviour on new installations. Any ideas what this could be or how to fix it ?
From recollection, the poller should only poll those items that have reached 0. If I remember correctly, it was <= 0 as there may have been cases where numbers less than zero were possible. So, every polling cycles, all the numbers should go down by 60 in your case, and when they hit 0, they should be reset to 300. I guess it could be more efficient, like to keep just a number in the settings table that changes and rotates. It would save a lot of I/O.
I understand that, my issue is that there are 19615 items that should be polled within the 5 Minute intervall, distributed over 5 1-Minute polls. But If I look at the polling stats there are a lot of items missing:
Okay, I did a few spine update, and corrected the 'reporting' issue on poller.php. I've setup a test on my local system, and it appears to work the way I would like it to.
The new connection pooling in spine should make it a bit faster for remote pollers with several devices, but it's unlikely you will notice it unless the latency is high.
Getting close, but not as it should be. It looks like the 5 minute polling is being done every 5 minutes now, but in between it looks like it still does the polling of these but just ignores the RRD updates.
The system currently does not have a single 1-Minute data source configured.
Edit: Poller Setting was 1 Minute cron, 1 Minute polling. Cronjob changed to 1 minute. Didn't test with new cacti polling daemon
. Cacti Version 1.2.16
mysql> select count(rrd_next_step) as items,rrd_step,rrd_next_step from poller_item where rrd_next_step<300 group by rrd_next_step,rrd_step;
+-------+----------+---------------+
| items | rrd_step | rrd_next_step |
+-------+----------+---------------+
| 19628 | 300 | 60 |
+-------+----------+---------------+
1 row in set (0.01 sec)
mysql> select count(rrd_next_step) as items,rrd_step,rrd_next_step from poller_item where rrd_next_step<300 group by rrd_next_step,rrd_step;
+-------+----------+---------------+
| items | rrd_step | rrd_next_step |
+-------+----------+---------------+
| 19628 | 300 | 0 |
+-------+----------+---------------+
1 row in set (0.08 sec)
mysql> select count(rrd_next_step) as items,rrd_step,rrd_next_step from poller_item where rrd_next_step<400 group by rrd_next_step,rrd_step;
+-------+----------+---------------+
| items | rrd_step | rrd_next_step |
+-------+----------+---------------+
| 19628 | 300 | 300 |
+-------+----------+---------------+
2 rows in set (0.02 sec)
mysql> select count(rrd_next_step) as items,rrd_step,rrd_next_step from poller_item where rrd_next_step<400 group by rrd_next_step,rrd_step;
+-------+----------+---------------+
| items | rrd_step | rrd_next_step |
+-------+----------+---------------+
| 19628 | 300 | 240 |
+-------+----------+---------------+
1 row in set (0.02 sec)
2021/03/01 11:47:48 - SYSTEM STATS: Time:46.7308 Method:spine Processes:1 Threads:100 Hosts:4899 HostsPerProcess:4899 DataSources:19628 RRDsProcessed:13455
2021/03/01 11:48:40 - SYSTEM STATS: Time:38.4290 Method:spine Processes:1 Threads:100 Hosts:4899 HostsPerProcess:4899 DataSources:0 RRDsProcessed:0
2021/03/01 11:49:36 - SYSTEM STATS: Time:34.1063 Method:spine Processes:1 Threads:100 Hosts:4899 HostsPerProcess:4899 DataSources:0 RRDsProcessed:0
2021/03/01 11:50:36 - SYSTEM STATS: Time:34.8326 Method:spine Processes:1 Threads:100 Hosts:4899 HostsPerProcess:4899 DataSources:0 RRDsProcessed:0
2021/03/01 11:51:37 - SYSTEM STATS: Time:36.3943 Method:spine Processes:1 Threads:100 Hosts:4899 HostsPerProcess:4899 DataSources:0 RRDsProcessed:0
2021/03/01 11:52:38 - SYSTEM STATS: Time:36.2827 Method:spine Processes:1 Threads:100 Hosts:4899 HostsPerProcess:4899 DataSources:0 RRDsProcessed:0
2021/03/01 11:53:51 - SYSTEM STATS: Time:48.8856 Method:spine Processes:1 Threads:100 Hosts:4899 HostsPerProcess:4899 DataSources:19628 RRDsProcessed:13457
2021/03/01 11:54:47 - SYSTEM STATS: Time:44.5000 Method:spine Processes:1 Threads:100 Hosts:4899 HostsPerProcess:4899 DataSources:0 RRDsProcessed:0
I think this is the correct behavior. So, I'm going to close this. The one thing that is tricky with the poller interval and the cron interval, is that when you change it, you have to completely repopulate your poller cache to get the items completely redistributed properly. We can revisit this at a later date.
changed the title [-]poller_items gets re-calculated with every poll when 1-minute and 5-minute data sources are mixed[/-][+]Poller items are evaluated too quickly when mixed polling cycles are used[/+]on Apr 12, 2021
Activity
TheWitness commentedon Feb 25, 2021
Thomas,
From recollection, the poller should only poll those items that have reached 0. If I remember correctly, it was <= 0 as there may have been cases where numbers less than zero were possible. So, every polling cycles, all the numbers should go down by 60 in your case, and when they hit 0, they should be reset to 300. I guess it could be more efficient, like to keep just a number in the settings table that changes and rotates. It would save a lot of I/O.
thurban commentedon Feb 26, 2021
I understand that, my issue is that there are 19615 items that should be polled within the 5 Minute intervall, distributed over 5 1-Minute polls. But If I look at the polling stats there are a lot of items missing:
So the data sourced being polled total up to 6762 ( the poll at 13:09 was missed by some unknown reason )
What I would have expected is more like this to happen:
So a changed in the rrd_next_step field would be expected, but not a complete change of the number of items field
TheWitness commentedon Feb 27, 2021
This seems to be a spine issue. I'm going to make a change. Need you to test the latest 1.2.x branch of spine afterwards.
TheWitness commentedon Feb 27, 2021
Change is in. Here is the commit. Cacti/spine@03f5acc
TheWitness commentedon Feb 27, 2021
Okay, I did a few spine update, and corrected the 'reporting' issue on poller.php. I've setup a test on my local system, and it appears to work the way I would like it to.
Fixing ChangeLog for #4147 and fixing #4148
TheWitness commentedon Feb 28, 2021
There was a spine issue though on remote collectors with the new connection pool deallocations routine. It was a typo. Working as expected now.
thurban commentedon Feb 28, 2021
Thanks a lot. Will try to test this today and report back with the results.
TheWitness commentedon Feb 28, 2021
The new connection pooling in spine should make it a bit faster for remote pollers with several devices, but it's unlikely you will notice it unless the latency is high.
TheWitness commentedon Feb 28, 2021
Just finished full QA. Was having more issues around spine data collection due to some copy and paste errors.
thurban commentedon Mar 1, 2021
Was trying to compile it on a Ubuntu just now but ran into a compilation issue:
Any specific commit/version I should try ?
Edit: Looks like the mysql version remove the my_bool deifnition: Motion-Project/motion#995
Edit2: changed the my_bool line to bool and got spine compiled.
thurban commentedon Mar 1, 2021
Getting close, but not as it should be. It looks like the 5 minute polling is being done every 5 minutes now, but in between it looks like it still does the polling of these but just ignores the RRD updates.
The system currently does not have a single 1-Minute data source configured.
I was compiling the latest version from https://github.com/Cacti/spine/archive/1.2.x.zip ( b6eba4e253f8f83ceb294becb22c0de662b18c44 )
Edit: Poller Setting was 1 Minute cron, 1 Minute polling. Cronjob changed to 1 minute. Didn't test with new cacti polling daemon
. Cacti Version 1.2.16
TheWitness commentedon Mar 12, 2021
@thurban, can you send me your personal email. All I have is your commercial support email.
thurban commentedon Mar 12, 2021
send you an email to your cacti.net mail address
TheWitness commentedon Apr 3, 2021
I think this is the correct behavior. So, I'm going to close this. The one thing that is tricky with the poller interval and the cron interval, is that when you change it, you have to completely repopulate your poller cache to get the items completely redistributed properly. We can revisit this at a later date.
[-]poller_items gets re-calculated with every poll when 1-minute and 5-minute data sources are mixed[/-][+]Poller items are evaluated too quickly when mixed polling cycles are used[/+]