Trevor Phillips wrote:
Benchmarking was done using an internal before and after check using Time::HiRes (as well as various stages during processing) as well as using "ab" to do multiple hits in succession.

If you use multiple threads in ab, a sub-optimal setting for the number of processes can hurt mod_perl performance. Try to tune it so that it's about the same as FastCGI.


Two other possibilities are using a different version of Perl (like one with theads and one without), or accidentally using the wrong version of your modules.

I replaced it with my own module, which again parses/compiles expressions into an external structure once, rather than doing it every time.

Hmmm. How do you cache these?


PerlFreshRestart On

Usually a bad idea...


PerlModule CGI;

You could gain more speed by replacing that. CGI_Lite or CGI::Simple are faster and should still be cross-platform.


On a server where there are other developers working on it, if I restart the server, it can interrupt others working.

Why don't you run your own server? It's easy to do, even if everyone is on the same machine and using the same mod_perl build.


In addition, if I stuff something up badly (such as a minor syntax error), it doesn't kill the whole server.

You mean on startup?


As a FastCGI, all I have to do to restart it is touch the main CGI file.

Does that restart the whole FastCGI daemon? Without affecting other people who are developing on it?


With mod_perl I restart with 'apachectl stop && apachectl start'.

I also have tighter control on the number of FastCGI processes, which is more useful for development.

You can specify an exact number with apache if you want to.


No objections to FastCGI; I just wondered if there was something we should be looking to add to mod_perl that would make it a more attractive dev environment for people who use FastCGI.

I also work on FastCGI as a low-ish denominator. There's less server impact to throw a FastCGI on, than to install mod_perl, if it's not already there.

If you're looking for an ISP-friendly approach to offer your potential users, check out SpeedyCGI aka PersistentPerl. It can be used without root access.


- Perrin

Reply via email to