Do RRD files grow?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Do RRD files grow?

Kevin Stewart-2
Once an RRD is created, as points are added, will the file grow over
time? Or does the file stay the same size (given that is is not tuned)?

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Do RRD files grow?

Pablo Sanchez
[ Comments below, in-line ]

On 06/19/2014 11:03 AM, Kevin Stewart wrote:
> Once an RRD is created, as points are added, will the file grow over
> time? Or does the file stay the same size (given that is is not
> tuned)?

Hi,

The files are pre-allocated during creation therefore they don't grow.

Cheers,
--
Pablo Sanchez - Blueoak Database Engineering, Inc
Ph:    819.459.1926         Blog:  http://pablo-blog.blueoakdb.com

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Do RRD files grow?

Simon Hobson
In reply to this post by Kevin Stewart-2
Kevin Stewart <[hidden email]> wrote:

> Once an RRD is created, as points are added, will the file grow over
> time? Or does the file stay the same size (given that is is not tuned)?

As Pablo says, they are pre-allocated and stay the same size - that size is known because you define all the DSs (data series), consolidations, and retention periods (ie number of consolidated data points to keep) when you create the file. Internally it is as the name says, a round robin. Each consolidated data set is defined by a single list of values - plus a pointer to the current "start/end". As new data comes in, it simply over-writes the oldest data and the pointer moved on - when the pointer gets to the end, it wraps around to the beginning. So nothing is "added" or "removed" - only updated in-place.

However I'm not sure what you mean by "not tuned" - because RRD files are actually quite highly tuned for a specific purpose, that of efficiently storing/extracting/graphing predefined sets of data as above.

As a bit of trivia, RRD Tools came out of the MRTG project - a set of tools to collect, consolidate, and graph interface traffic rates for routers (hence Multi Router Traffic Grapher).

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Do RRD files grow?

Kevin Stewart-2
When I say tune, I mean utilizing rrdtune and rrdresize to affect
changes to the RRD file. I suspected the file was fixed, but wanted a
little bit more assurance. Thanks for the response.

On 6/19/2014 10:59 AM, Simon Hobson wrote:

> Kevin Stewart <[hidden email]> wrote:
>
>> Once an RRD is created, as points are added, will the file grow over
>> time? Or does the file stay the same size (given that is is not tuned)?
> As Pablo says, they are pre-allocated and stay the same size - that size is known because you define all the DSs (data series), consolidations, and retention periods (ie number of consolidated data points to keep) when you create the file. Internally it is as the name says, a round robin. Each consolidated data set is defined by a single list of values - plus a pointer to the current "start/end". As new data comes in, it simply over-writes the oldest data and the pointer moved on - when the pointer gets to the end, it wraps around to the beginning. So nothing is "added" or "removed" - only updated in-place.
>
> However I'm not sure what you mean by "not tuned" - because RRD files are actually quite highly tuned for a specific purpose, that of efficiently storing/extracting/graphing predefined sets of data as above.
>
> As a bit of trivia, RRD Tools came out of the MRTG project - a set of tools to collect, consolidate, and graph interface traffic rates for routers (hence Multi Router Traffic Grapher).
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Do RRD files grow?

Alex van den Bogaerdt-5

----- Original Message -----
From: "Kevin Stewart" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, June 19, 2014 6:32 PM
Subject: Re: [rrd-users] Do RRD files grow?


> When I say tune, I mean utilizing rrdtune and rrdresize to affect
> changes to the RRD file. I suspected the file was fixed, but wanted a
> little bit more assurance. Thanks for the response.

rrdtool resize will alter the size, shrink or grow. This will happen when
you run the command, after which you will get a static size again.
rrdtool tune will not alter the size. It tunes parameters within the file.

HTH
Alex


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Do RRD files grow?

ekgnkb3d
But - be aware of compressed filesystems:
If you look with "ls" to the filesize, they don't grow, they are allocated by creation. A compressed filesystem like jffs2 compresses such an empty .rrd file to about 5%.
Over time, when you update the rrd-file you add information, so it can be less compressed, after some years it can only be compressed to 50% - so the space used on the medium grows.

Cheers
  Achim