Zoom with a total bandwidth problem

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

ilyassa
Posts: 8
Joined: Mon Oct 25, 2004 3:40 am
Location: Saint-Petersburg/Russia

Zoom with a total bandwidth problem

Post by ilyassa »

Hi,
When I zoom a graphic I have a total bandwidth number more bigger than it presents on the main graphic. Is it a feature or a bug?
ilyassa
Posts: 8
Joined: Mon Oct 25, 2004 3:40 am
Location: Saint-Petersburg/Russia

Post by ilyassa »

P.S. graphics:
Attachments
Main graphic
Main graphic
unzoomed.JPG (117.78 KiB) Viewed 6181 times
Zoomed graphic
Zoomed graphic
Zoomed.JPG (120.04 KiB) Viewed 6181 times
Hip
Posts: 18
Joined: Wed Sep 01, 2004 5:21 am
Location: Switzerland

Post by Hip »

I can report the same problem.

It happens too when displaying the four defined RRAs for a single graph, the total seems to be wrong on some graphs.

Apparently, I think that the total is not right on the graphs that partially span a period for which there is no value in the RRA.

Anyone can confirm this ?!
nayco

Post by nayco »

Same here, but i never considered it a bug, I think it's a feature :wink:...

I think it's beacause of the average that is made on different time spans: 1MB/s will appear as such if you make one plot per second and such a flow lasts much more than one second, but if it lasts 10 seconds and you plot only each minute, you may have a spike at 167KB/s...

I'm right :-? ?
Hip
Posts: 18
Joined: Wed Sep 01, 2004 5:21 am
Location: Switzerland

Post by Hip »

nayco wrote:I think it's beacause of the average that is made on different time spans: 1MB/s will appear as such if you make one plot per second and such a flow lasts much more than one second, but if it lasts 10 seconds and you plot only each minute, you may have a spike at 167KB/s...
I agree with you on that point. But shouldn't the sum function take into account that (for ex.) 167KB/s was an average on 1 minute (167KB * 60s = approx. 10MB transferred) and 1MB/s was only during 10s (1MB * 10s = 10MB transferred too!) ?! I'm not sure this is a feature.
Guest

Post by Guest »

nayco wrote:I think it's beacause of the average that is made on different time spans: 1MB/s will appear as such if you make one plot per second and such a flow lasts much more than one second, but if it lasts 10 seconds and you plot only each minute, you may have a spike at 167KB/s...
I think that spans on the main and zoomed graphics are equal.
Marador
Posts: 5
Joined: Sun Oct 03, 2004 6:43 pm

Post by Marador »

If you check the bottom of your graphs in 0.8.6b you will see the time period your data is averaged over.

Because you are averaging the data over a greater period of time, and that this is a "peak", your data value will drop.

The intervils are -

5 Minute
30 Minute
2 Hour
1 Day
ilyassa
Posts: 8
Joined: Mon Oct 25, 2004 3:40 am
Location: Saint-Petersburg/Russia

Post by ilyassa »

Perhaps, zoomed graphs calculate their total bandwidth proceed from the span of the main graph (ex. 2 hour, 1 day), but really they has 30 min period of time.
Hip
Posts: 18
Joined: Wed Sep 01, 2004 5:21 am
Location: Switzerland

Post by Hip »

ilyassa,

Do you have the source (rrdtool command-line) used to generate these graphs ?! Maybe there some clue about the RRAs used or something like that.
ilyassa
Posts: 8
Joined: Mon Oct 25, 2004 3:40 am
Location: Saint-Petersburg/Russia

Post by ilyassa »

Hip wrote:Do you have the source (rrdtool command-line) used to generate these graphs ?! Maybe there some clue about the RRAs used or something like that.
You need rrdtool to install cacti. So I have rrdtool, of course.
How can I see, total bandwidth calculation is an internal function of the Cacti and it's result installs to the graph like a comment. I think that total bandwidth calculation may be realized with CDEF, but raX had reasons to create its own function. Zooming and sum are not working correctly together. We can try to analize this trouble or wait new release/patch/workaround.
ilyassa
Posts: 8
Joined: Mon Oct 25, 2004 3:40 am
Location: Saint-Petersburg/Russia

Post by ilyassa »

"DEF call automatically chooses an RRA which contains CF consolidated data in a resolution appropriate for the size of the graph to be drawn." This is from the rrdtool manual. But bandwidth summarization uses resolution from the main graph (rra_id), isn't it?
Hip
Posts: 18
Joined: Wed Sep 01, 2004 5:21 am
Location: Switzerland

Post by Hip »

ilyassa,

Which cacti version are you using ? As I can see, this is not a 0.8.6 release as there is no time period information on the unzoomed graph. I remember that I had some problems with patched 0.8.5x versions, but no problem with 0.8.6b.
ilyassa
Posts: 8
Joined: Mon Oct 25, 2004 3:40 am
Location: Saint-Petersburg/Russia

Post by ilyassa »

0.8.6b
You can zoom graph with 2 hour interval and see this trouble
Hip
Posts: 18
Joined: Wed Sep 01, 2004 5:21 am
Location: Switzerland

Post by Hip »

ilyassa wrote:"DEF call automatically chooses an RRA which contains CF consolidated data in a resolution appropriate for the size of the graph to be drawn." This is from the rrdtool manual. But bandwidth summarization uses resolution from the main graph (rra_id), isn't it?
I think you're right, you spot the problem.

The bandwidth_summation() function is given the $rra_steps based on the main graph. But when the rrdtool_function_fetch() function is called, it is just given a $start_time and $end_time.

Based on these two times (and as you quoted), rrdtool will internally select the RRA used to graph and/or to fetch the results. This works if the selected RRA is the same as the RRA used on the main graph.

BUT: if you zoom on a recent period, it is possible that the period covered by the zoom is fully available in a RRA with a smaller granularity. So this other RRA will be internally selected by rrdtool when fetching the values. Cacti will then multiply each value with the rra_steps of the original RRA, so the resulting traffic volume will be higher.

Does it make sense to you ?!

The "Resolution Interval" chapter in the rrdtool fetch manual provides the solution (to try !).

http://people.ee.ethz.ch/~oetiker/webto ... fetch.html

In brief: the start time and end time specified to rrdtool must be multiple of the resolution of the wanted RRA and the wanted RRA must cover the period (obvious).

I have no time to try this solution now but maybe tomorrow.
Hip
Posts: 18
Joined: Wed Sep 01, 2004 5:21 am
Location: Switzerland

Post by Hip »

I quickly hacked a patch that adds resolution support when executing the rrdtool fetch command. This fixes the summation problem for me.

Can anyone (ilyassa ?) try this patch too and tell me the result ?!
Attachments
cacti_sum_fix.patch.txt
patch
(2 KiB) Downloaded 406 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests