perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: [mp2] perl_clone takes 5 and more seconds to complete
Date Tue, 04 Nov 2003 20:03:25 GMT

> Applying a simple trace to modperl_interp.c:
> 
> +        MP_TRACE_i(MP_FUNC, "perl_clone start\n");
>          interp->perl = perl_clone(perl, clone_flags);
> +        MP_TRACE_i(MP_FUNC, "perl_clone end\n");
> 
> easily shows that perl_clone() is the one that takes an impractical 
> amount of time to complete.
> 
> Where does this bring us? When a new request is coming in and all 
> interpreters are busy and the pool quota is not full, a new interepreter 
> will be cloned. And your request will be served in 6-10 secs instead of 
> 50msecs. Now imagine a busy webserver with no spare CPU cycles, 
> perl_clone may take 20 secs and more.

I certainly don't disagree with you that this is not ideal and we ought to 
improve it if we can.

however, what this means to me is that you need to tweak and tune a threaded 
mpm - namely PerlInterpMinSpare - just like you do prefork if you don't want 
your application to suffer.  I know lots of people were hoping that the 
threaded mpms would improve performance by mere virtue of the reduced 
process size, but I guess there is a trade-off in that.

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message