Perrin Harkins wrote:
No, it's just the opposite.  Using prefork won't save CPU, but it will
save memory, meaning you can run more perl interpreters.

I'm sorry, but I have to disagree here - especially with the configuration I need. Let's take the server with 1 GB of memory as an example.

With prefork, running ~ 600 processes results in roughly 700MB of memory consumption. This obviously gives us 600 client "download slots", and 600 perl interpreters, and leaves some memory for other processes and disk caching.

With the threaded worker mpm, I can run ~150 processes, each with 20 threads, and 3 perl interpreters. This will use about the same about of memory, so roughly 700MB. This in turn gives us 3000 client "download slots", but "only" 450 perl interpreters.

When most of the time the client uses is not spent inside the mod_perl handlers or filters, but rather downloading the actual content, 'PerlInterpScope handler' can be a lifesaver - a few interpreters can easily handle the load for a much higher number of client threads.

The normal way to do this is to have your mod_perl server separate
from your static file server, usually by doing a reverse proxy to the
mod_perl server.  Then the static server handles doling out bytes to
slow clients.  A few variations of this setup are discussed in the
docs.

I know what you mean, but the problem here is that this mod_perl server *is* the reverse proxy :) There are several backend servers which this server will both proxy and cache the content for - mod_perl is, putting it simply, just needed for additional intelligence.

Honestly, the person who has done the most work on debugging thread
crashes is Torsten.  His advice on how to debug it will be better than
mine.  It does seem like people usually solve them by using backtrace
analysis though.

Torsten suggested that I'd take a core dump and try to see which memory regions are corrupted. As working with dumps, debuggers and the whole lot is definately not one of my strongest suits, all help here would be most appreciated. I think I could manage to actually get my hands on a dump, but what to do after that is a bit of a mystery..

Cheers,
-- Jani

Reply via email to