Re: Mod_Perl and MaxRequestsPerChild
On 10/16/07, Mark Maunder <firstname.lastname@example.org> wrote:[color=blue]
> Mornings are the busiest for us, so the following is not during peak.
> This is my current mod_status:
> 39.4 requests/sec - 114.4 kB/second - 2976 B/request
> 80 requests currently being processed, 170 idle workers[/color]
Do you have a proxy server in front of this? If not, it might make a
big difference in how many active mod_perl processes you need.
> I peak at about 75% of my threads being busy. If I have any less than
> 250 spare threads, then I get an alert from our monitoring every few
> hours with a timeout because I suspect I'm hitting maxclients every
> now and then.[/color]
You'd see a message in your error_log if you were hitting MaxClients.
> perlInterpStart and PerlInterpMax are 3 and 5 respectively if they are
> the defaults.[/color]
Then your 5 processes with only 4 using real memory probably means no
more than 20 perl interpreters. I think that if you ran prefork with
20 processes and a front-end proxy you would see the same performance
with less memory used. Right now, you have a lot of threads that
aren't running perl but are sending out data to clients. A front-end
proxy should do that in a prefork setup to avoid tying up the
> Is there a way to check at runtime what these params are
> set to?[/color]
I think Apache2::Directive will do it.
> And what do you recommend for 250 threads?[/color]
I avoid threads like the plague, so I couldn't really tell you from
experience. It sounds like your current settings are working for you
though, except for the problem you originally mentioned, which I'm
afraid I don't have any ideas about. Maybe someone who runs threads
(Torsten?) would have a guess.