Ticket #3 (closed patch: fixed)

Opened 7 years ago

Last modified 3 months ago

Faster CGI graphs

Reported by: jo Assigned to: jo
Priority: high Milestone: Munin 1.4
Component: master Version:
Severity: normal Keywords:
Cc: None

Description

Right now the CGI graphs are drawn one at a time, reading all the configuration data for each graph drawn. This makes it very slow, especially when viewing a node with a lot of plugins.

Munin should support at least one method of keeping the config (and other information that can be kept) in memory between runs. This can be done through a lot of apache modules (e.g. fastcgi).

Attachments

munin-cgi-graph_fastcgi.diff (4.6 kB) - added by blueyed on 05/11/08 01:21:46.
Patch for munin-cgi-graph (Fixed patch, just called "rediff" on the previous one)
munin-cgi-graph_fastcgi.2.diff (11.8 kB) - added by do on 08/12/08 20:14:25.
fastscgi patch for trunk
munin-fastcgi-ticket3.diff (8.6 kB) - added by blueyed on 12/19/08 01:53:06.
Patch against SVN trunk as described in the previous comment
munin-cgi-graph (8.4 kB) - added by blueyed on 12/19/08 01:55:18.
For reference: my munin-cgi-graph (derived from the patch)
munin-graph (40.7 kB) - added by blueyed on 12/19/08 01:55:35.
For reference: my munin-graph (derived from the patch)

Change History

11/29/05 15:04:39 changed by ilmari

  • priority changed from normal to low.

10/30/06 00:06:37 changed by janl

  • milestone set to Munin 1.4.

10/30/06 00:07:03 changed by janl

  • keywords deleted.
  • priority changed from low to normal.
  • version deleted.
  • component changed from doc to server.
  • severity changed from blocker to normal.

06/14/07 01:16:53 changed by blueyed

The patch provides fastcgi support for munin-cgi-graph. However, it still just "exec"s munin-graph, when new images have to be generated - maybe that could be improved, too.

05/11/08 01:21:46 changed by blueyed

  • attachment munin-cgi-graph_fastcgi.diff added.

Patch for munin-cgi-graph (Fixed patch, just called "rediff" on the previous one)

07/28/08 14:44:39 changed by frieder

doesn't apply to current svn trunk

08/12/08 20:13:52 changed by do

Here is a new patch. I do not know whether it works with the semaphore stuff... it works for version 1.2.6 in Debian, though.

08/12/08 20:14:25 changed by do

  • attachment munin-cgi-graph_fastcgi.2.diff added.

fastscgi patch for trunk

12/19/08 01:51:08 changed by blueyed

I've reworked my initial patch and fixed the Last-Modified handling.

The current patch includes a patch to munin-graph, which includes a call to utime so the generated images contain the "last update" value. This can be used very effectively by munin-cgi-graph now.

The patch also reverts the "fix" for graph_usable introduced in ticket #499. Also, I had to change $IPC_KEY to 9340 (like in do's munin-cgi-graph_fastcgi.2.diff, otherwise semget failed). I'm not sure, if this semaphore handling is required after all (or does more harm than good, e.g. if IPC_KEY=9340 fails for others now).

I've also changed the HTTP_IF_MODIFIED_SINCE check, since the previous one did not take the field sent by the browser into account at all (it only triggered the check).

The patch changes the flow as follows: 1. if the graph is not usable (too old for the current time frame) or reload is forced (ctrl-f5) a new graph gets created 2. This will have the "last update" time (which graph_usable and $last_modified uses) 3. If the browser sends last-modified-since, it gets checked against the image's datetime and in case it's recent enough, a 304 gets sent. 4. Otherwise the image gets sent.

Please consider applying the patch to trunk, so that this (old) ticket can be closed finally.

I'm attaching a patch against trunk and the files as I'm using them (in a 1.2.x install), where munin-graph differs a lot, but munin-cgi-graph is quite the same as in trunk (with the patch).

Thanks.

12/19/08 01:53:06 changed by blueyed

  • attachment munin-fastcgi-ticket3.diff added.

Patch against SVN trunk as described in the previous comment

12/19/08 01:55:18 changed by blueyed

  • attachment munin-cgi-graph added.

For reference: my munin-cgi-graph (derived from the patch)

12/19/08 01:55:35 changed by blueyed

  • attachment munin-graph added.

For reference: my munin-graph (derived from the patch)

10/27/09 23:47:25 changed by janl

  • priority changed from normal to high.
  • type changed from enhancement to patch.

Pushing up the priority for this - will be in 1.4 if at all possible.

10/28/09 01:48:38 changed by janl

  • status changed from new to closed.
  • resolution set to fixed.

Patches adapted. Thanks a lot. In r2734.

10/27/11 11:41:14 changed by acquiladra1984

Anyone who loves films is likely to love movie downloads, too. The actual fact is that this development is changing into an enormous one and it is great for many who wish to create large collections without having to dole out prime dollar or premium home space to do so. How to download video from vimeo are actually accessible legally from all sorts of massive film studios and even television networks, as well. A video assortment created digitally has a number of benefits over regular disk purchases, too. The most important perks of video downloads contain the storage issues and pricing. But, why? Video downloads are typically a number of dollars or more less than an everyday DVD buy as a result of there isn't any packaging issues to contend with. Plus, there's the straightforward truth supply is not an issue either. For the reason that corporations that sell downloads save on transport and the film studios save on packaging, they will pass on a few of these savings on to buyers. In regard to storage, it is a easy reality of space. It is an entire lot simpler to retailer films on a computer drive or a backup drive than it is to carry 100 videos in a room. There isn't any need for shelf after shelf or tons of DVD towers when a collection is created via video download. Management of flicks and tv downloads could be a complete lot easier, too. It's fairly simple to create folders on the computer to retailer films by genre and it is a complete lot faster, too. Video downloads are becoming the favorites of many for a motive past storage or pricing. This purpose is variety. The actual fact is the kinds of downloads obtainable might be actually thoughts boggling. Let's take a look at what kinds of video downloads might be discovered legally: Hit motion pictures Nearly every new movie that hits the theaters will find yourself in a legal obtain format shortly after release. This means there is not any have to run to the video store, or worse, pay high greenback at a theater to see a brand new release. Television programs Vimeo tube downloads As the film studios leap on the bandwagon, so too are the television studios. Hit reveals from all many years might be found by the season or by the episode via video download.Classics Because the film download business becomes more well-liked, many studios are video through their catalogues and providing downloads of their older movies. From the classics of the 1920s to vacation favorites of the 1980s, they will all be discovered via video download. And, if a title can't be discovered right now, it is likely it will likely be added quickly as every main film studio falls into place offering downloads through a variety of completely different sites. Video downloads present their users with an on demand side, value financial savings and storage concern discount that regular DVD buys cannot. As this new format turns into more and more accepted, it's changing into the method of choice for buying and watching movies. Original works There are tons of areas to get video downloads from beginner or little identified creators. These videos might not have the monetary backing of some of the major movies in history, but that does not imply there is not some good entertainment out there. Indie works are getting an entire new viewers because of video downloads and the Internet.