[Raleigh-talk] mod_perl 2.0, mpm_worker, and ithreads

Trevor Little trevormg19 at gmail.com
Thu Dec 6 12:22:00 PST 2007


Hey everybody,

I'm hopping someone can lend me some experience with mod_perl 2.0,
mpm_worker, and ithreads. Specifically, I'm trying to decide the best
way to deploy mod_perl in a production environment and after reading
through all the documentation I could absorb today, I'm still left
with some questions. I should mention first that none of the code
we've written uses threads, I'm just trying to figure out the
benefits/disadvantages to running in a threaded mod_perl environment
with mpm_worker.

1. How do I know if a cpan module I use is thread-safe? Is there any
way to know for sure without reading all the code myself? We use a lot
of CPAN modules and having to go back and check each one for thread
safety, re-implementing the ones that are not, would keep me away from
ithreads for now.

2. Some of our cgi scripts override signal handlers and fork their own
children. Is that going to play nice in a threaded environment break
things?

3. Is there a performance benefit to running mod_perl with mpm_worker
if almost all requests to the server will be to a cgi application?
I've read people who've said that perl's memory usage with threads is
worse than with pre-fork, and I've read documentation that seems to
imply the opposite.

Obviously that's a lot of questions and I'm not expecting anybody to
give me a free in-depth course on perl threads. However, if you've
used mod_perl with mpm_worker, I'd love to hear how it worked out for
you and weather youd recommend it.

Thanks in advance.

Trevor


More information about the Raleigh-talk mailing list