From owner-freebsd-questions@FreeBSD.ORG Fri Sep 11 12:09:06 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A3B4106566B for ; Fri, 11 Sep 2009 12:09:06 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 185F78FC1A for ; Fri, 11 Sep 2009 12:09:05 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1Mm4w5-0003t9-7e for freebsd-questions@freebsd.org; Fri, 11 Sep 2009 14:09:05 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Sep 2009 14:09:05 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Sep 2009 14:09:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Date: Fri, 11 Sep 2009 14:08:54 +0200 Lines: 21 Message-ID: References: <4AA9BCF0.6040003@identry.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.22 (X11/20090817) In-Reply-To: <4AA9BCF0.6040003@identry.com> Sender: news Subject: Re: reducing size of apache instances X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2009 12:09:06 -0000 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.