Ok, I did a quick test to give some evidence and show what is going on.
In this case I'm using my data10 sensor, since it makes the investigation easier:
data10 is counting (part of my) electricity usage, so it constantly goes up. Which means that the minimum is always the start of a reporting period and the end is always the highest value.
Also keep in mind that the timestamps are not absolute, this counter is only incremented every minute. , but the same will apply for every other sensor that is not reporting every second
First let's have a look of the start of the time periods:
Sample taken at Wed Dec 8 22:16:42 CET 2010
Code: Select all
day1_data10_valuemin_time 20101208000013 (current day)
hour1_data10_valuemin_time 20101208220004 (current hour)
last15m_data10_valuemin_time 20101208220101
last24h_data10_valuemin_time 20101207221614
last60m_data10_valuemin_time 20101208211619
month1_data10_valuemin_time 20101201000108 (current month)
year1_data10_valuemin_time 20100101000011 (current year)
So far so good, this is pretty straightforward. As mentioned before the end of the reporting period is a bit more tricky:
Sample taken at Wed Dec 8 22:05:02 CET 2010
Code: Select all
day1_data10_valuemax_time 20101208215857
hour1_data10_valuemax_time 20101208215857
last15m_data10_valuemax_time 20101208215857
last24h_data10_valuemax_time 20101208215857
last60m_data10_valuemax_time 20101208215857
month1_data10_valuemax_time 20101208181117
year1_data10_valuemax_time 20101208053001
At this point we were looking at aggregated data that is 6 minutes old. Also note that month1 and year1 have not been updated since 18:11 and 05:30.
Sample taken at Wed Dec 8 22:05:19 CET 2010
Code: Select all
day1_data10_valuemax_time 20101208220204
hour1_data10_valuemax_time 20101208220204
last15m_data10_valuemax_time 20101208215857
last24h_data10_valuemax_time 20101208215857
last60m_data10_valuemax_time 20101208215857
month1_data10_valuemax_time 20101208181117
year1_data10_valuemax_time 20101208053001
At this point some statistics were already refreshed (day1, hour1) while the rest was still work in progress
Sample taken at Wed Dec 8 22:05:36 CET 2010
Code: Select all
day1_data10_valuemax_time 20101208220204
hour1_data10_valuemax_time 20101208220204
last15m_data10_valuemax_time 20101208215857
last24h_data10_valuemax_time 20101208220204
last60m_data10_valuemax_time 20101208220204
month1_data10_valuemax_time 20101208181117
year1_data10_valuemax_time 20101208053001
Another 15 seconds later all 5 minute interval stats have been updated but the last15m aggregates. This is why I did document the order of the aggregate functions on my webpage, just to be aware that not everything is updated simultaneously.
Sample taken at Wed Dec 8 22:05:54 CET 2010
Code: Select all
day1_data10_valuemax_time 20101208220204
hour1_data10_valuemax_time 20101208220204
last15m_data10_valuemax_time 20101208220204
last24h_data10_valuemax_time 20101208220204
last60m_data10_valuemax_time 20101208220204
month1_data10_valuemax_time 20101208181117
year1_data10_valuemax_time 20101208053001
Another 15 seconds later the 5 minute interval aggregate has finished.
Also, keep in mind that:
- during some time frames each day, the aggregate might be delayed, since another, less infrequent aggregate is running.
- The number of sensors will have an impact on the run time of the aggregations, your mileage will vary
- The platform you are running on will have an influence on the run time of the aggregations.
Last but not least, there is a very good reason for shifting the aggregations a bit around, it's a very CPU intensive process, and Boris needs to make sure that other processes, like data collection, are not impacted too much by the aggregations