[rrd-users] VDEF, 95th percentile and graph width

Johan Elmerfjord jelmerfj at adobe.com
Thu Sep 4 14:51:01 CEST 2014


Hi Marius,

I have never used the ABSOLUTE before, as I don't have any counters that resets upon read.
But if the data looks correct in the graph, then that's probably fine.
I'm always afraid to have this kind of setups as a test-run that fetches a value will also trigger a counter reset - and the next real reading will be off.

Regarding the width:
All your samples are put into a number of buckets containing one or more values - all depending on how many samples you are analyzing, and how many "buckets" you can show on your screen.
10000 samples in a 300 pixel wide graph will be about 10000/300=33 samples per bucket.
If you increase the width to 1000 pixels - then you will get 10 per bucket.
In the DEF's on the first two rows you define how this data should be aggregated.
you specified that all the samples should be AVERAGEd to a simple value.
This is probably the most correct way of doing it - and works very well in most cases.
If your data jumps up and down a lot - it may be an issue.

In the next step you are converting bits to bytes by multiplying by 8 for both in and out traffic.

Then you are making a new series (allbits) where you take the maximum-value of in and out.
I don't understand the meaning in doing that.
I would suggest trying to calculate the 95 percentile for in and out separately (as two values) or to add in and out together for calculating the percentile.
As you are doing it today - you may ignore up to 50% of your data (if in and out are the same).

You can also do the calculation without creating a graph - where you can set the "bucket" size or width to something that doesn't aggregate your data.
But I think that the issue is the "allbits" line.
Split it to two values - or just "+" them together instead of using the "MAX".

Good luck!

/Johan


On Thu, 2014-09-04 at 14:21 +0200, Marius Karthaus wrote:


Hello list,

While searching the web on how to calculate the 95th percentile from an
RRD, most results return something like:

rrdtool graph graph.png \
DEF:in=foo.rrd:in:AVERAGE \
DEF:out=foo.rrd:out:AVERAGE \
CDEF:inb=in,8,* \
CDEF:outb=out,8,* \
CDEF:allbits=inb,outb,MAX \
VDEF:pct=allbits,95,PERCENT \

However I find that the result produced this way is highly incorrect.
Not only that, but the result is greatly influenced by the width (-w)
option for generating the graph. On my test dataset changing -w from 400
to 1000 pixels (while keeping all other things the same) the 95Th
percentile swings back and forth between 17 and 38 Mbit. Am I doing
something wrong, or is this behaviour to be expected?

My create command, the measurements I'm inserting are 'bytes transferred
since last measurement'

# rrdtool create foo.rrd --start $start --step 300
DS:in:ABSOLUTE:600:0:U DS:out:ABSOLUTE:600:0:U RRA:AVERAGE:0.5:1:100000

Regards,
Marius

_______________________________________________
rrd-users mailing list
rrd-users at lists.oetiker.ch<mailto:rrd-users at lists.oetiker.ch>
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20140904/e576d6ad/attachment.html>


More information about the rrd-users mailing list