Hello, I have a rather silly question regarding rollups and data retentions - I couldn't find an answer on the Wiki. How long does blueflood keep the rolled-up data? Is it always 14 days for all granularities?
I'm okay with the granularities but need to change the number of slots for each:
5m for 1 day
20m for 1 week
60m for 2 weeks
240m for 1 month
1440m for 1 year
Is this possible? What will happen if the slots are simply changed in Granularity class to reflect this requirement?
Thanks,
Yarin
--
You received this message because you are subscribed to the Google Groups "Blueflood Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blueflood-disc...@googlegroups.com.
Visit this group at https://groups.google.com/group/blueflood-discuss.
To view this discussion on the web visit https://groups.google.com/d/msgid/blueflood-discuss/334e6a27-fb61-4c92-8dcb-97adaf93aa42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Slots: The number of locations to save a metric within a certain time period. This is equal to the number of times a discrete 'granularity' occurs over a given time range.
| granularity | slots |
| metrics_5m | 4032 |
| metrics_20m | 1008 |
| metrics_60m | 336 |
| metrics_240m | 84 |
| metrics_1440m | 14 |
Here is a brief description on how slots work.A slot is a time slot. The schema does not directly reflect slots. One purpose of the slots is to properly map data between granularities.Blueflood maintains data at these granularities 5m, 20, 60m, 240, 1440m. Lets say a metric as 10 data points in a 5 min period, we rollup those data points and store it as one data point in metrics_5m table. Similarly 4 data points in metrics_5m table, gets rolled up to 1 data point in 20m table and four 20m slots correspond one 60m slot and so forth.To properly map between granularities, we assigned a fixed number of slots to each granularties. The numbers are shown below. Slots 1-4 of 5m granularity maps to slot 1 of 20m, slots 5-8 of 5m granularity maps to slot 2 of 20m granularity and so forth. By doing this we get a fixed mapping. At any given time, for a given (slot, granularity) combination we will be able to tell, the corresponding slot number of higher granularity it corresponds to.
granularity slots metrics_5m 4032 metrics_20m 1008 metrics_60m 336 metrics_240m 84 metrics_1440m 14 Why does blueflood have 4032 slots of 5m granularity? 4032 * 5 is roughly equivalent to 14 days. I dont know the significance of this number, 14 days, but I dont believe thats a very important number. I will take a stab at explaining why.First of all, to decide on the number of slots to assign for 5m granularity they needed a number which is commonly divisible by 4(20m), 12(60m), 48(240m), 288(1440m) so that each slot has a proper mapping to higher granularties. So as blueflood starts assigning slot numbers to each 5m periods, after 4032 * 5 mins, it will run out of 5m slots. So it will start from 1 again. But before re-using slot 1, we have to be sure rollups are finished for slots 1-4 from previous cycle. Inorder to provide ample time for rollups, they might have just made it 14. So technically you have atleast 14 days to rollup data before you run out of slots, provided you are storing data in full resolution for that long.