Hi there,

On Thu, 16 Aug 2001, Jonathan Edwards wrote:

> Related to this topic, I have a question about multiple instances of Apache.
> We run two mod_perl enabled sites on two separate IPs. These sites rely on
> mod_perl heavily. Each site has a unique perl script that handles just about
> everything. Currently, we only have one instance of Apache running, and I've
> noticed that the httpd child processes are quite large (up to 32megs!).
> We've upgraded the RAM on our server twice and now we're at 512, but it
> seems to be using all of that without a problem. Are these httpd processes
> so large because they include copies of both perl scripts? Would it be more
> efficient to set up two instances of Apache, one for each site/IP, and that
> way each child httpd would only contain one of the two perl scripts?

You can experiment but I wouldn't hold out great hopes of miracles.
It could be that there's a lot of bloat from modules that you use, so
you can find that even an apparently small script makes your Apache
children grow alarmingly.  Another common fault - if you can call it a
fault - is the abuse of Perl's willingness to read huge data
structures into RAM.  It's sometimes the result of quick-n-dirty
coding techniques at the prototype stage finding their way into
user-facing code.  You might also find that a large fraction of the
RAM used by Apache is shared so effectively it doesn't matter.

Do the processes start off much smaller and grow over time?  If so it
might be worth cutting down on MaxRequestsPerChild to see what happens.

There's a good section about tuning in the Guide, it covers the
sharing issues too.

http://perl.apache.org/guide (forgive me if you've read it already:).

73,
Ged.


Reply via email to