Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 2009 14:08:54 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: reducing size of apache instances
Message-ID:  <h8dek8$tsa$1@ger.gmane.org>
In-Reply-To: <4AA9BCF0.6040003@identry.com>
References:  <4AA9BCF0.6040003@identry.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John Almberg wrote:
> My Apache 2.2 instances are running about 18 Meg each. I've been 
> thinking about doing something to trim these down, and I think tomorrow 
> is the day to take action. They are getting out of hand.
> 
> I've done a bit of research on this. I think the way to get started is 
> to eliminate unused modules. Problem is, I know which ones I need, since 

There is another thing you can try. Judging from the process size you've 
given it looks like you are not using PHP or a similar Apache module. 
Also, you didn't specify anything so I assume you are using the default 
configuration, which operates in "prefork" mode - MPM_PREFORK, which 
means a separate process is forked for every request.

If all of this is true, you can trivially switch to the worker-threaded 
MPM in which every Apache process (which will be of comparable size to 
the one you currently have) will handle a large number of request. In 
effect, instead of e.g. 50 Apache processes active for 50 connections, 
you will have 2-3 Apache processes.

Enable WITH_MPM=worker in /etc/make.conf to enable this.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?h8dek8$tsa$1>