I would like to store time series data, such as CPU usage over 6 Months (Will poll the CPU usage every 2 minutes, so later I can get several resolutions, such as - 1 Week, 1 Month, or even higher resolutions, 5 Minutes,etc).
I'm using Perl, and I dont want to use RRDtool or relational database, I was thinking of implementing my own using some sort of a circular buffer (ring buffer) with the following properties:
- 6 Months = 186 Days = 4,464 Hours = 267,840 Minutes.
- Dividing it into 2 minutes sections: 267,840 / 2 = 133,920.
- 133,920 is the ring-buffer size.
- Each element in the ring-buffer will be a hashref with the key as the epoch (converted easily into date time using
localtime
) and the value is the CPU usage for that given time. - I will serialize this ring-buffer (using
Storable
I guess)
Any other suggestions? Thanks,