"Bug" in new graph creation

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

Moderators: Developers, Moderators

Post Reply
Rune Nilssen

"Bug" in new graph creation

Post by Rune Nilssen »

I have a Cisco 7200 router with about 1600 interfaces, whenever the interface list shows it takes forever to list, wasnt that slow before I upgraded to 0.8.5 from 0.8.2a. Second when I try to select an interface, the java script that tags the line and marks it orange goes awol spending 100% cpu on my computer (p4 2.4ghz) for close to a minute.

Maybe these two shoudl be optimized a tad, especially the java script should be possible to optimize? I wouldnt know about either of the scripts though.


Best regards,
Rune Nilssen
www.directconnect.no
moonman
Cacti User
Posts: 101
Joined: Sat Sep 06, 2003 10:25 am

its not a bug

Post by moonman »

just go to options and chnge the javascript max rows or something like this
Rune Nilssen

Post by Rune Nilssen »

Seems to have no effect whatsoever. It still takes ages to select any interface in long lists, and it jams up my cpu 100% for several minutes. The default javascript rows limit were set to 96, reducing it to one third, didnt resolve or even ease the problem as far as I could tell.

Are we talking about different things?


Best regards,
Rune Nilssen
Guest

Post by Guest »

Can anyone give me any additional info about this? Have anyone experienced similar problems as I have?



Regards,
Rune Nilssen
guest

new graph creation issue with many interfaces

Post by guest »

I am also seeing an issue when I add a graphs on a device with many interfaces. 100+, like a cat4000. If you add interface graphs over the certain amount the next time you add there are no Interfaces listed in add graph.

Also, if you delete some graphs and data sources to get below the number it works again.

Could be around 96?

Any ideas?
mwb
Posts: 3
Joined: Thu Mar 25, 2004 12:11 am

Post by mwb »

I have noticed that listing the interfaces for a host is a very intensive process for mysql to execute. I investigated the queries that were executed and added an index to the database using this command:

create index data_input_data__data_template_data_id_index on data_input_data(data_template_data_id);

that has sped up this specific process but we still notice cacti being somewhat slow in our deployment with around 30,000 graphs.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

mwb wrote:I have noticed that listing the interfaces for a host is a very intensive process for mysql to execute. I investigated the queries that were executed and added an index to the database using this command:

create index data_input_data__data_template_data_id_index on data_input_data(data_template_data_id);

that has sped up this specific process but we still notice cacti being somewhat slow in our deployment with around 30,000 graphs.
There are definitely still a few places where certain select queries could be optimized. I need to sit down and run the "big" queries through MySQL's 'explain' and optimize indexes appropriately. It would be nice if there was a tool out there would would profile your SQL and give you a summary of how it can be optimized better. I wouldn't be surprised if such a tool exists.

-Ian
User avatar
Morgan
Cacti User
Posts: 187
Joined: Wed Feb 25, 2004 3:38 am

Re: "Bug" in new graph creation

Post by Morgan »

Rune Nilssen wrote:I have a Cisco 7200 router with about 1600 interfaces,

jesus chris, what are you doing ont hat 7200 ? AS concentration?
flagg
Posts: 3
Joined: Tue Mar 30, 2004 2:52 pm
Location: Menasha, WI

new graph creation "flakes out" on many catalyst i

Post by flagg »

I have been adding new devices over the last few weeks and cisco routers seam to add fine. However, when I add catalyst switches (many interfaces) the new graph creation "flakes out". For example, if I add the interfaces a few at a time (5-10) it works for most of the interfaces and once I get to the end the "new_graph.php" screen stays blank and never recovers. However it does seam to create many of the data sources and templates. Once this happens and I go back to the "new graph" screen on that device none of the interfaces show up.

I did adjust the php.ini to 300 seconds.

I am runnign this using winxp, apache, 0.8.5 cacti..

Any ideas would be appreciated.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Re: new graph creation "flakes out" on many cataly

Post by raX »

flagg wrote:I have been adding new devices over the last few weeks and cisco routers seam to add fine. However, when I add catalyst switches (many interfaces) the new graph creation "flakes out". For example, if I add the interfaces a few at a time (5-10) it works for most of the interfaces and once I get to the end the "new_graph.php" screen stays blank and never recovers. However it does seam to create many of the data sources and templates. Once this happens and I go back to the "new graph" screen on that device none of the interfaces show up.
There is definitely a lot of code that gets executed when you create new traffic graphs. There are two things that I can do to make this better in future releases.

1) Audit my PHP code. Does anyone know of any good PHP source auditing tools?
2) Audit my SQL. This will happen at some point and adding indexes to the correct places should create a huge benefit.

-Ian
Rune Nilssen

Re: "Bug" in new graph creation

Post by Rune Nilssen »

Morgan wrote:
Rune Nilssen wrote:I have a Cisco 7200 router with about 1600 interfaces,

jesus chris, what are you doing ont hat 7200 ? AS concentration?
Well, terminating ATM VP/VC pairs (DSL connections actually).


However, the slowness problem Im experiencing seem to be not ralated so much to SQL queries as it is to some sort of java script or whatever running then large interface tables are displayed or tagged. This pretty much jams my cpu (on the computer where the browser runs) for several minutes, rendering the process of creating a new graph a slow and painful one.

Someone suggested Id go to options and change "Data Queries - Maximum JavaScript Rows" under Visual in Cacti Settings. Only problem is, it just doesnt work.

rax? Any input what so ever on this?


Best regards,
Rune Nilssen
rune@directconnect.no
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

The "Data Queries - Maximum JavaScript Rows" setting is what I would point at as well. In theory this setting should disable all JavaScript code execution on the "New Graphs" page. It is quite possible that I missed a few things though. I will take a closer look at this tomorrow and get back to you if I find anything worth patching.

-Ian
Rune Nilssen

Post by Rune Nilssen »

Id be happy to let you try it for yourself to see if you experience anything similar. Although depending on your location connections may be poor.


Best regards,
Rune Nilssen
www.directconnect.no
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Definitely a bug. Apply the patch against 0.8.5a by doing the following in your Cacti directory:

Code: Select all

wget http://www.raxnet.net/downloads/cacti/patches/0.8.5a/total_javascript_rows.patch
patch -p1 < total_javascript_rows.patch
Or get the pre-patched 'graphs_new.php' file here:

http://www.raxnet.net/downloads/cacti/p ... hs_new.php

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests