[rrd-users] rrdtool graph slow on some columns

christian smyth clsmyth at fuzzy-elves.org
Wed Sep 7 02:52:06 MEST 2005


Folks,

Hi, I have an rrd I created that has 4 columns (well, DS's).  Every 5
minutes I shove in some data from df -k about a specific filesystem on a
unix box.  I generate graphs from time to time.  Thing is, if I generate
a graph from data in one column, the rrdtool graph command completes in,
say, .2 (that's two-tenths) second.  If I generate that same graph (e.g.
if I use the same command) but reference a different column, then
command takes about 3-4 seconds to run.  This represents a difference of
an order of magnitude!  This is very odd to me.

I am using rrdtool 1.2.11 on gentoo linux, kernel 2.6.12.3  I have tried
this on 3 diferent boxes, so I know it is not box-specific.  Here is my
rrdtool creation command:

rrdtool \
        create \
        --step 300 \
        df.rrd \
        DS:kb_total:GAUGE:360:U:U \
        DS:kb_used:GAUGE:360:U:U \
        DS:kb_free:GAUGE:360:U:U \
        DS:pct_used:GAUGE:360:U:U \
        RRA:LAST:0.0:1:115200 \
        RRA:AVERAGE:0.5:12:9600 \
        RRA:AVERAGE:0.5:288:400 \
        RRA:AVERAGE:0.5:2016:57 \
        RRA:AVERAGE:0.5:8640:13

As you can see, I am keeping 400 days worth of actual data points ( 12
readings per hour * 24 hours * 400 days = 115200), and some averages.

Here is the slow rrdtool graph command:

rrdtool graph \
    --imgformat PNG \
    --width 12960 \
    --start -3888000 \
    --x-grid "HOUR:1:HOUR:12:DAY:1:0:%a %m/%d" \
    -t "/file/system Space Used, last 45 days" \
    -v "KB" \
    -b 1024 \
    df.kbu.png \
    DEF:val1=df.rrd:kb_used:LAST \
    LINE1:val1#0000ff

and here is the fast one:

rrdtool graph \
    --imgformat PNG \
    --width 12960 \
    --start -3888000 \
    --x-grid "HOUR:1:HOUR:12:DAY:1:0:%a %m/%d" \
    -t "/file/system Pct Space Used, last 45 days" \
    -v "percent" \
    -l 0 \
    -u 100 \
    df.pct.png \
    DEF:val1=df.rrd:pct_used:LAST \
    LINE1:val1#0000ff

I have tried creating the rrd afresh and shoving in some dummy data; all
graphs done with that data seem to work fine (e.g. fast).  I cannot seem
to reproduce this scenario unless I am using the rrd I originally
created.  I guess the problem has something to do with the data in
there, but I can't imagine what.  I have tried exporting and importing
the data, that didn't fix it.

If necessary, I can post my actual rrd or the xml dump or both to a
website somewhere.  Please help; I have zillions of rrd's with this
problem, and it is slowing down my graph creation process a lot!

-- 
christian smyth <clsmyth at fuzzy-elves.org>

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list