good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: mpm-worker + mod_perl2 settings meaningby wrog (Friar) |
on Nov 11, 2014 at 00:34 UTC ( [id://1106764]=note: print w/replies, xml ) | Need Help?? |
Am I right, that perl interpreters being created and cached in the client proces and couldn't be tossed between them? Short answer: no. PerlInterpMax is max for the server. They are kept in a pool and assigned to child threads as needed, i.e., if there is a worker thread that needs a perl interpreter (not all of them do) for a particular request, then one gets fished out of the pool, connected up, used to service the request, and then put back in the pool when the child is finished with it. Different interpreters can be assigned to the same child at various times and a given interpreter can be used in multiple children; you have no way of knowing other than that the thread IDs can keep changing. This was my motivation for creating Thread::IID, which gives you intepreter IDs, because there exist applications where you need to know which interpreter is which. Although, to be fair, I later came to the conclusion that hardly anybody actually uses MPM-Worker on mod-perl2 production sites because of the numerous perl modules lurking out there (in 2014, still) that are not actually thread-safe (though I'll also note that it is actually possible to run MPM-Worker — I still do — you just have to be careful about which XS modules you're going to depend on; many of the core ones that matter have been taken care of at this point)
In Section
Seekers of Perl Wisdom
|
|