This recent thread on improving performance contained a node by mugwumpjism that got me thinking about CGI performance. So to feed my thoughts, I poked around the net a bit and came to the conclusion that:
Since I started the afternoon predisposed to notice facts that supported my mod_perl prejudice, I thought it best to get a couple second opinions before installing mod_perl and modifying my scripts based on the information that follows.
Both FastCGI and mod_perl achieve their speed-up by avoiding the overhead of starting a process for each CGI request. This overhead is apparently more noticeable with perl CGI scripts than with compiled C programs. A Perl script has to be re-compiled each time it is run. Speed increases of 400 to 2000 percent are claimed.
Both FastCGI and mod_perl claim benefits beyond speed-up. As a novice I don't understand what many of these features are but according to this chart, mod_perl has more of em.
mod_perl seems to have wider support and more active development.
A FastCGI super search turned up about (8) nodes. My down arrow finger got tired scrolling through all the mod_perl nodes on perlmonks.org
Via google I turned up a few external nodes comparing FastCGI to mod_perl. Several people remarked that they'd found FastCGI support lacking.
FastCGI is no longer bundled with Apache. At modules.apache.org, the page for the FastCGI module was last updated three years ago and the link to the module's page is broken.
The process for installing mod_perl looks clear to me.The process for installing FastCGI looks a little scary. The docs begin something like: "...you need a FastCGI-savvy version of Perl..." There doesn't seem to be a debian package for FastCGI...
While they aren't relevant to my situation, FastCGI does seem to have strengths that mod_perl lacks.
I'm not clear on how big a feature the last point actually is. Is there a big difference between running (4) Apache/mod_perl boxes and a database box and running (2) FastCGI boxes, (2) Apache boxes and a database box?
--mandogIn reply to FastCGI and mod_perl compared by mandog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |