ysth has asked for the wisdom of the Perl Monks concerning the following question:

My general question: in what circumstances would you use the worker MPM with mod_perl instead of prefork?

Although I'd like to here any general wisdom people have to offer, my particular situation is: dedicated application servers that load modules at startup and run only ModPerl::Registry scripts, behind a reverse proxy server.

Replies are listed 'Best First'.
Re: mod_perl and worker MPM
by cbrandtbuffalo (Deacon) on Aug 22, 2008 at 12:05 UTC
    If you're running on Windows, you'll want to use the worker MPM. On *nix type systems, the path of least resistance is still to stick with prefork. Not all modules are written in a thread-safe manner, so depending on what you are using, you can run into issues. But people have been running tons of CPAN modules under prefork for years.
      The gist is correct, but Windows actually uses an MPM called mpm_winnt. The worker MPM is not the default on any OS, but can be used on Unixy systems for static files, where it generally outperforms prefork. I like to make my front-end proxy server use the worker MPM for the performance gain on static files.