[rrd-users] Performance of RRDtool when adding RRAs

Alex van den Bogaerdt alex at ergens.op.HET.NET
Sun Dec 2 13:35:30 MET 2001


To show the effect of adding RRAs to an RRD I did some testing.
This test may not be very scientific, it may lack some necessary
elements etcetera however it does (IMHO) show what the effects
are.

The test:
- Create and populate four different databases
- Extract images from these four databases while measuring the time

The images are 1000 pixels wide, spanning either 1800000 seconds
(which is 1800 seconds per pixel) or 3600000 seconds (which is
3600 seconds per pixel).  The end time is set to 1007161200 in
all cases, the start time is set relative to the end time.

The databases are spanning enough time to create the images.

The RRAs involved are:
a) one RRA with a one-second resolution
b) one RRA with a five-minute resolution
c) one RRA with a one-hour resolution

The availability of an RRA in an RRD:
           RRA a | RRA b | RRA c
-----------------+-------+------
Database 0: yes  |  no   |  no
Database 1: yes  |  yes  |  no
Database 2: yes  |  no   |  yes
Database 3: yes  |  yes  |  yes

In order to get measurable differences I created each image 250 times.
I did so with and without the "--lazy" flag to make sure I didn't fool
myself.  The difference with this flag were as expected.  The results
are shown too.

Using the "--lazy" flag, generating only 1 out of 250 images:

Making images of 1800000 seconds
database name   user    system
------------------------------
RRD r0.rrd      0.39    0.21
RRD r1.rrd      0.30    0.30
RRD r2.rrd      0.37    0.23
RRD r3.rrd      0.37    0.24

Making images of 3600000 seconds
database name   user    system
------------------------------
RRD r0.rrd      0.25    0.35
RRD r1.rrd      0.34    0.27
RRD r2.rrd      0.31    0.29
RRD r3.rrd      0.27    0.33

Without using the "--lazy" flag, generating all 250 images:

Making images of 1800000 seconds
database name   user    system
------------------------------
RRD r0.rrd      88.15   9.92
RRD r1.rrd      7.98    0.54
RRD r2.rrd      87.98   9.94
RRD r3.rrd      7.81    0.70

The difference between r0 and r2 are small enough to consider them
to be equal.  The same is true for r1 and r3.

Making images of 3600000 seconds
database name   user    system
------------------------------
RRD r0.rrd      167.81  22.18
RRD r1.rrd      8.30    0.50
RRD r2.rrd      7.96    0.43
RRD r3.rrd      8.01    0.39

Here the difference between r2 and r3 are small enough to consider
them to be equal.  The difference between r0 and r1 are huge.  The
difference between r1 and r2 (or r3) are small but noticable.

As you can see, the impact of the 5-minute RRA is very high, the
extra impact of the 1-hour RRA is marginal.

The availability of an RRA with a resolution equal (or closer) to
the resolution used in the image is very important.  When there's
only one RRA, consolidation occurs at graph time.  To generate the
values used per pixel column, rrdtool has to do a lot of calcula.
Combining 3600 rows into 1, for 1000 pixels, has a large impact on
the time needed.  Combining 12 rows into 1, for 1000 pixels, has a
much smaller impact.  This is why adding the 1-hour resolution RRA
does not make much difference here.

The lazy flag also has a huge impact.  This is only true when the
images to be created are indeed exactly the same.  For a large
user base this may be the case, for occasional viewing it will not
save time however it shouldn't hurt either.

Note that this example set of RRAs shows why it is important to
structure your databases correctly.  It doesn't show that you need
to have an RRA with a 300-second resolution, it shows that the
resolution of your RRA and your images should match.  A good example
of not matching between RRAs and image is the 1-hour resolution
available while graphing in a 30-minute resolution.

HTH
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list