Better performance!

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
User avatar
thomasN
Posts: 21
Joined: Tue Nov 16, 2004 3:29 pm

Better performance!

Post by thomasN »

When you open the graph tree I can see that there is one select for every device added. We have approx 200 so this takes a while. And this doesn't seem to happen simultaneously but one at a time.

And when you have reached a host and click 'Interface - Traffic' to display all traffic graphs for one host I can see that the same number of selects are done once again.

Couldn't this be read and cached in some way? Sure takes a lot of time to browse around looking at graphs if you don't have only 5 devices.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

This is the way the tree works. We are re-evaluating how it works, possible options are using frames, or sub trees, etc.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Tony,

I posted a fix to both MAIN (0.8.7) and BRANCH_0_8_6 CVS' tonight. It uses a session variable to hold the query results that speeds things up a bit. It times out based upon the page refresh setting in "Graph Settings". This will make it poll the MySQL server less, but it is still CPU intensive on the server.

I have close to 200 hosts at the office and when you select to "Expand Hosts" it is gruesome.

There is currently a warning message with the code. I will fix that tomorrow.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Not only can that be CPU intensive, but it can be memory intensive. I don't know if that is a good idea.

We will figure it out. Send me an email about it.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
thomasN
Posts: 21
Joined: Tue Nov 16, 2004 3:29 pm

Post by thomasN »

TheWitness wrote:Tony,
Who's Tony? :lol:
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Me....

Lol, I should sign my real name?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Tony,

The whole thing is way ugly. I have a few ideas. Will be working late tonight.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
thomasN
Posts: 21
Joined: Tue Nov 16, 2004 3:29 pm

Post by thomasN »

Just an idea... is it possible to use links/wget/whatever in some way perhaps top make a static copy of the entire graph view of cacti?

So you could point your users to that instead of the live one. That would speed thinks up. Maybe not zoom but just for viewing the graphs in it's simplest form.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Thomas, this may not be a feature request. Look at "Settings->Graph Export". I didn't write it, but I "think" it accomplishes what you want.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
drub
Cacti User
Posts: 59
Joined: Thu Jan 31, 2002 7:00 pm
Location: Las Vegas
Contact:

Post by drub »

I think the Host: feature under graph tree would work best if when you submit the query to enter that as a new graph tree item it populates the graph_tree_items as it would appear in the tree view,

Basically when you use the Host: feature now everytime you load the graph_view?action=tree it has to query mysql for every item that belongs to the host rather than just read the contents of graph_tree_items, it would be great if it built these host: trees in that table.
User avatar
thomasN
Posts: 21
Joined: Tue Nov 16, 2004 3:29 pm

Post by thomasN »

Hi

Has there been any progress on this matter? With our 6929 graphs / 149 devices it takes +60 seconds for every click in the graph menu (when selecting something).

And that's on a pretty fast machine...
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests