Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Wed Jul 23, 2014 2:28 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Zooming too far = high CPU use rrdtool process
PostPosted: Thu Jun 30, 2005 4:50 am 
Offline

Joined: Thu Jun 30, 2005 4:40 am
Posts: 3
Location: Victoria, Australia
G'day guys,

I was wondering if there are any known issues with the "zoom" functionality of cacti, as I find if you zoom in to a graph too far it creates a high CPU usage rrdtool process on my system, which can be done multiple times if you want. I end up having to kill the process as the page never returns until I do so...

I have used probably the last 3 versions of cacti (I'm on 0.8.6e now) and have seen it in all versions - both using rrdtool 1.2.x and 1.0.x

Is there a work-around or fix for this, as it seems anybody can cause high CPU load on my box if they choose to - simply by over-using the zoom function.

Is there any way I can "limit" how far someone can zoom in? As it seems to happen when you zoom in under a 5 minute interval on a graph.

Cheers, and TIA - love cacti! :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 30, 2005 9:40 am 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5904
Location: Michigan, USA
Another user was reporting this problem. I have never been able to reproduce.

Are you running windows or unix. And if so, where did you get RRDtool from. Did you compile it, or get it pre-compiled?

It's not a cacti bug, I'm pretty sure it's a RRDTool issue.

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 30, 2005 10:54 am 
Offline

Joined: Thu Jun 30, 2005 4:40 am
Posts: 3
Location: Victoria, Australia
It is essentially compiled by portage as I run a Gentoo system.

If there is some refernce post on these forums or some tip on how I can use a pre-compiled version of rrdtool that doesn't exhibit the behaviour that you could point me at then that'd be great!

Cheers.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 30, 2005 11:14 am 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5904
Location: Michigan, USA
No reference, I'm just trying to get an idea what is causing this.. :(

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 01, 2005 5:54 pm 
Offline

Joined: Sat Apr 30, 2005 1:11 pm
Posts: 12
Hi pezz,

I am the other user who is facing the same problem as you. I too use Cacti on a Gentoo server and I have the same problem. For further info, look at these links :



If you have any idea, would be great !


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 01, 2005 6:09 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
There are circumstances that cause the older versions of RRDTool to enter race conditions.

One of them was associated with Area/Stack graphs. This problem occured in 1.0.x and 1.2.x until a certain point release. It's definately fixed in 1.2.10 that much I know. It happened when you have malformed graph item ordering.

Question, for the graphs in question, do they ever appear accurate? If so, please post a few things 1) Graph Syntax 2) RRDfiles in XML format.

I will report the bug to Tobi.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 01, 2005 6:20 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
Also, does this only happen with either 95th percentile or Bandwidth type graphs?

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 02, 2005 2:40 am 
Offline

Joined: Thu Jun 30, 2005 4:40 am
Posts: 3
Location: Victoria, Australia
This problem happens on all of my graphs whether they be area / stack or line graphs. I also upgraded to rrdtool 1.2.10 to see if it fixed the issue, and it didn't.

I have since gone back to 1.2.6 as I like to keep in sync with stable packages.

I'll pass on the info you have requested when I get the chance.

Cheers.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 02, 2005 5:08 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
Are they all graphs types or just bandwidth/95th percentile type? Does it only happen when you zoom in? Is there a point where the CPU starts racing. Please provide additional details and we can release a patch to zoom.js. (i.e. If we know what the minimum "safe" timespan is (end_time - begin_time) we can prevent the zoom feature from going that low.)

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 02, 2005 10:37 am 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5904
Location: Michigan, USA
It's minimum is 1 second right now.

I have been able to zoom down to that in many many rrdtool files.

How many DS's are in the graphs that do this? How old are those files? Have they been around for a long time?

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 04, 2005 7:07 pm 
Offline

Joined: Wed Jun 01, 2005 6:09 pm
Posts: 34
Hi all same problem here, I'm also having this with all my graphs.

I'm also using gentoo linux 2005
I'm using rrdtool-1.2.6r1 which is concidered stable.

Here's some syntax

Code:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1120464662 \
--end=1120476453 \
--title="Hum outside" \
--base=1000 \
--height=220 \
--width=700 \
--upper-limit=100 \
--lower-limit=0 \
COMMENT:"From 2005/07/04 10\:11\:02 To 2005/07/04 13\:27\:33\c" \
COMMENT:"  \n" \
--vertical-label="Procent" \
--slope-mode \
DEF:a="/var/www/localhost/htdocs/cacti/rra/test_snmp_oid_11.rrd":snmp_oid:AVERAGE \
LINE2:a#6EA100:"Luchtvochtigheid"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s"  \
GPRINT:a:MIN:"Minimum%8.2lf %s\n"  \
HRULE:85#FF3932:"Maximum Waarde"  \
HRULE:50#4444FF:"Minimum Waarde"  \
HRULE:65#B1441E:"Streefwaarde\n"


The last thing I changed before I noticed this behavious is when I've changed the standard RRA's into this:

Code:
Name                                   Steps       Rows       Timespan
Daily (5 Minute Average)            1               600                 86400
Weekly (5 Minute Average)             1             2200              604800
Yearly (5 Minute Average)              1              105120    33053184
Monthly (5 Minute Average)           1             9000            2678400


The point of this is to have a resolution of 5 minutes for every day, week, month and year

There is only 1 datasource for the graphs
The rrd's are about 10 days old
If I zoom down to 20 minutes, rrdtool hangs with 99% cpu

If you want to know more, i can try to give you answers,.....

Greetings


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 04, 2005 7:46 pm 
Offline

Joined: Sat Apr 30, 2005 1:11 pm
Posts: 12
Here, it happens with ALL kinds of graphs and ONLY happens when zooming (hence my feature request to disable zooming via prefs on Mantis bugtracker because for us, this is a major/critical issue and can be used for DoS'in a server hosting Cacti).

Here is what rrdtool was doing when the CPU was toping at 100% usage :
Code:
/usr/bin/rrdtool graph -
--imgformat=PNG
--start=1120451367
--end=1120452092
--title="Orthanc - Memory"
--base=1000
--height=150
--width=500
--alt-autoscale-max
--lower-limit=0
COMMENT:From 2005-07-04 06\:29\:27 To 2005-07-04 06\:41\:32\c
COMMENT:  \n
--vertical-label=Size (bytes)
--slope-mode
--font TITLE:9:/usr/local/opt/TrueTypeFonts/tahomabd.ttf
--font AXIS:7:/usr/local/opt/TrueTypeFonts/tahoma.ttf
--font LEGEND:7:/usr/local/opt/TrueTypeFonts/lucon.ttf
--font UNIT:8:/usr/local/opt/TrueTypeFonts/tahoma.ttf
DEF:a=/usr/local/opt/cacti/rra/orthanc_mlk_mem_total_88.rrd:mlk_mem_total:MAX
DEF:b=/usr/local/opt/cacti/rra/orthanc_mlk_mem_free_87.rrd:mlk_mem_free:AVERAGE
DEF:c=/usr/local/opt/cacti/rra/orthanc_mlk_mem_buffers_85.rrd:mlk_mem_buffers:AVERAGE
DEF:d=/usr/local/opt/cacti/rra/orthanc_mlk_mem_cache_86.rrd:mlk_mem_cache:AVERAGE
CDEF:cdefa=a,1024,*
CDEF:cdefc=b,1024,*
CDEF:cdefh=c,1024,*
CDEF:cdefbc=d,1024,*
LINE1:"defa#000000:Total
GPRINT:cdefa:MAX:-%17.2lf %sB\n
AREA:cdefc#8F005C:Free
GPRINT:cdefc:LAST:   - Current\:%8.2lf %sB
GPRINT:cdefc:MIN:- Min\:%8.2lf %sB
GPRINT:cdefc:AVERAGE:- Avg\:%8.2lf %sB
GPRINT:cdefc:MAX:- Max\:%8.2lf %sB\n
AREA:cdefh#FF5700:Buffers:STACK
GPRINT:cdefh:LAST:- Current\:%8.2lf %sB
GPRINT:cdefh:MIN:- Min\:%8.2lf %sB
GPRINT:cdefh:AVERAGE:- Avg\:%8.2lf %sB
GPRINT:cdefh:MAX:- Max\:%8.2lf %sB\n
AREA:cdefbc#FFC73B:Cache:STACK
GPRINT:cdefbc:LAST:  - Current\:%8.2lf %sB
GPRINT:cdefbc:MIN:- Min\:%8.2lf %sB
GPRINT:cdefbc:AVERAGE:- Avg\:%8.2lf %sB
GPRINT:cdefbc:MAX:- Max\:%8.2lf %sB\n


and here is the graph I was zooming. Selecting any kind of zone for zooming results in a CPU usage at 100% on the server with a staled rrdtool command (which must be killed with kill -9/-KILL pid)


Attachments:
File comment: SNMP Memory graph : Last position before killing CPU
zooming_graph_memory.png
zooming_graph_memory.png [ 21.92 KiB | Viewed 4642 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 04, 2005 10:03 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
Guys,

Dump the rrd files associated with the graph syntax in the attached and attach the XML files. I will research. It will take a few days though. On vacation till the 9th.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 4:11 am 
Offline

Joined: Wed Jun 01, 2005 6:09 pm
Posts: 34
K,

Here's the rrd file it's quite huge (1,8 Mb)
The Graph Template in xml
The Data Template in xml

It concerns the processes graph.
It's one of the default graphs which is available with a new install.
I Have modified nothing about these graphs.
The only thing I modified are the RRA values because i wanted more detail (hence the rrd file size 1,8 MB) (see earlier post) on this topic

I hope I gave enough info to help, if not give me detailed description of what to do,....

PS :

If I look at the previous posts it all concerns gentoo.........
I'm not sure (don't kill me if i'm wrong :D ) but this problem started when I changed the RRA values to get more detailed graphs from the past)


Attachments:
File comment: gzipped,......
localhost_proc_7.rrd.gz [8 KiB]
Downloaded 126 times
cacti_graph_template_unix_processes.xml [7.24 KiB]
Downloaded 129 times
cacti_data_template_unix_processes.xml [2.95 KiB]
Downloaded 107 times
Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 6:27 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
emat,

Did you simply make changes from the UI or did you use the "RRDtool tune" function, or both? Another method would be to change the settings in Cacti and then delete the RRD file..

Again, I will look at these on the 9th or thereafter.

Thanks,

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group