perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <torsten.foert...@gmx.net>
Subject How to guess PerlInterpMax?
Date Wed, 21 Mar 2007 14:33:06 GMT
Hi,

while configuring an mp2 with worker mpm I found it hard to guess how many 
interpreters are needed for my needs. The best way to measure the utilization 
of the interpreters I thought would be the time a request is blocked waiting 
for an interpreter to become available. The patch below measures this time 
and computes an exponential moving average similar to what Linux does to 
compute load averages.

I am aware the patch below is not ready to be included in mod_perl. It is 
rather a hack. But I think something like this is necessary to guess the 
right values for PerlInterpMax & co. If you like it please let me know how to 
shape it up.

The patch uses Brian Atkins' mod_slotmem (see 
http://www.gossamer-threads.com/lists/apache/dev/318465#318465) as shared 
memory implementation and hooks into mod_status for reporting.

I am using mod_perl mostly from Uri Translation to Fixup. So I have 
configured "PerlInterpScope handler". Now I see I can handle 800 parallel 
requests with 20 interpreters without much blocking whereas 1000 parallel 
requests lead to significant blocking intervals during a ramp-up phase. But 
when enough server processes are started even that load is handled without 
much blocking. Now my apache handles much more connections than with the 
prefork mpm and uses much less memory. Now network io or cpu speed is rather 
the limiting factor than memory.

Torsten

Mime
View raw message