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 reply to Re: mpm-worker + mod_perl2 settings meaning by wrog
in thread mpm-worker + mod_perl2 settings meaning by hurricup

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.