From owner-freebsd-questions@FreeBSD.ORG Tue Sep 21 09:46:20 2010 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 7ABDC106564A for ; Tue, 21 Sep 2010 09:46:20 +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 070068FC12 for ; Tue, 21 Sep 2010 09:46:19 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OxzQU-00032X-A1 for freebsd-questions@freebsd.org; Tue, 21 Sep 2010 11:46:14 +0200 Received: from pool-173-79-86-179.washdc.fios.verizon.net ([173.79.86.179]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Sep 2010 11:46:14 +0200 Received: from nightrecon by pool-173-79-86-179.washdc.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Sep 2010 11:46:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Michael Powell Followup-To: gmane.os.freebsd.questions Date: Tue, 21 Sep 2010 05:48:23 -0400 Lines: 39 Message-ID: References: <20100920060811.GA10084@admin.sibptus.tomsk.ru> <20100921090316.GA36655@admin.sibptus.tomsk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: pool-173-79-86-179.washdc.fios.verizon.net Subject: Re: apache22 and threads 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: Tue, 21 Sep 2010 09:46:20 -0000 Victor Sudakov wrote: [snip] >> >> My thoughts are this matters depending upon which mpm you choose to build >> into apache. The default is prefork, and it handles incoming requests by >> spawning child processes. > > Do you mean to say "WITH_MPM=prefork" works exactly like apache13? > Essentially yes. Although you don't have to specify as it is the default. You would only need to specify for a non-default configuration. >> >> An additional consideration might be what kind of backend is used. For >> example, since not all of PHP is known to be thread safe it is not >> recommended for use with a threaded server and mod_php. The way to get >> around this situation is to separate PHP from Apache with something like >> mod_fcgid which runs PHP as a FastCGI. This way you can safely run a >> threaded Apache with non-thread safe PHP. As far as which is the better >> approach I still am not really sure. Each has its set of pros and cons. > > From what you have written it seems that prefork and no threads > is the robustest, most reliable configuration (even if more resource > consuming)? > Most tried and true with the longest track record. Definitely the conservative approach. I have been running the event mpm with PHP as FastCGI for about a year and a half now on two servers with no reliability issues. However, neither is ever fully loaded so I can't say whether they'd fold if hit with enough traffic. The prefork mpm without threads and mod_php is a safe bet for a server that will not be hitting the wall, traffic volume-wise. -Mike