[rrd-developers] Calculating exact size of RRD base

Bigunyak Dmitry icestar at inbox.ru
Wed May 14 14:25:36 CEST 2008

On Sat, 10 May 2008 15:05:54 +0400, Bigunyak Dmitry <icestar at inbox.ru>  

> Hello!
> Can anybody tell me how I cat calculate exact size of my RRD base depends
> on amount of data sources and RRAs configurations?

My own response here.
I have made some tests and got the following results.
1. For storing RRD base header requires 120 bytes.
2. For storing header for one data source in base needs 232 bytes.
3. For storing header for one archive in base needs 112 bytes.
4. For storing one data source header in archive needs 80 bytes.
5. For storing one data source value in archive needs 8 bytes.

So we can calculate total exact size of RRD base by next formula:
Size = 120+232*d+a(112+80*d)+8*d*Sum(row_i)
d - number of data sources;
a - number of rra;
row_i - number of rows in i-th rra;
Sum(row_i) - total number of rows in all archives.

For base with 3 data sources and 3 rra (1, 5 and 10 rows accordingly) we  
will have:

Size = 120+232*3+3(112+80*3)+8*3*(1+5+10) = 2256 bytes.

Check it please.

Dima: Nosce te ipsum
e-mail: icestar at inbox.ru

More information about the rrd-developers mailing list