From owner-freebsd-questions@FreeBSD.ORG Fri Sep 11 13:58:30 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 E8B221065698 for ; Fri, 11 Sep 2009 13:58:30 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: from smtp-gw29.mailanyone.net (smtp-gw29.mailanyone.net [208.70.128.55]) by mx1.freebsd.org (Postfix) with ESMTP id B1FBB8FC2B for ; Fri, 11 Sep 2009 13:58:30 +0000 (UTC) Received: from mailanyone.net by smtp-gw29.mailanyone.net with esmtpa (MailAnyone extSMTP jalmberg@identry.com) id 1Mm6dt-0006x6-Aq; Fri, 11 Sep 2009 08:58:26 -0500 Message-ID: <4AAA577A.8070103@identry.com> Date: Fri, 11 Sep 2009 09:58:18 -0400 From: John Almberg User-Agent: Postbox 1.0.0 (Macintosh/2009090801) MIME-Version: 1.0 To: Ivan Voras References: <4AA9BCF0.6040003@identry.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org 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 13:58:31 -0000 Ivan Voras wrote: > 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. I am using PHP, in fact. I've listed all the loaded modules below, and marked the ones I added with an '*'. I need the proxy modules because I use Apache as a front end for Mongrel. BTW, this is Apache 2.2 on FreeBSD 7.1 This WITH_MPM=worker sounds interesting. I'll have to read up on it. I guess there is some downside to enabling it, like slower performance? -- John Loaded Modules: core_module (static) mpm_prefork_module (static) http_module (static) so_module (static) authn_file_module (shared) authn_dbm_module (shared) authn_anon_module (shared) authn_default_module (shared) authn_alias_module (shared) authz_host_module (shared) authz_groupfile_module (shared) authz_user_module (shared) authz_dbm_module (shared) authz_owner_module (shared) authz_default_module (shared) auth_basic_module (shared) auth_digest_module (shared) file_cache_module (shared) cache_module (shared) disk_cache_module (shared) dumpio_module (shared) include_module (shared) filter_module (shared) charset_lite_module (shared) deflate_module (shared) log_config_module (shared) logio_module (shared) env_module (shared) mime_magic_module (shared) cern_meta_module (shared) expires_module (shared) headers_module (shared) usertrack_module (shared) unique_id_module (shared) setenvif_module (shared) version_module (shared) *proxy_module (shared) *proxy_http_module (shared) *proxy_balancer_module (shared) *ssl_module (shared) mime_module (shared) *dav_module (shared) status_module (shared) autoindex_module (shared) asis_module (shared) info_module (shared) cgi_module (shared) dav_fs_module (shared) vhost_alias_module (shared) negotiation_module (shared) dir_module (shared) imagemap_module (shared) actions_module (shared) speling_module (shared) userdir_module (shared) alias_module (shared) *rewrite_module (shared) *php5_module (shared) Syntax OK