From owner-freebsd-questions@FreeBSD.ORG Tue Sep 21 09:03: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 9426D1065679 for ; Tue, 21 Sep 2010 09:03:20 +0000 (UTC) (envelope-from sudakov@sibptus.tomsk.ru) Received: from relay2.tomsk.ru (relay2.tomsk.ru [212.73.124.8]) by mx1.freebsd.org (Postfix) with ESMTP id E8EB08FC1B for ; Tue, 21 Sep 2010 09:03:19 +0000 (UTC) X-Virus-Scanned: by clamd daemon 0.93.1 for FreeBSD at relay2.tomsk.ru Received: from admin.sibptus.tomsk.ru (account sudakov@sibptus.tomsk.ru [212.73.125.240] verified) by relay2.tomsk.ru (CommuniGate Pro SMTP 5.1.13) with ESMTPSA id 14377838 for freebsd-questions@freebsd.org; Tue, 21 Sep 2010 16:03:17 +0700 Received: from admin.sibptus.tomsk.ru (sudakov@localhost [127.0.0.1]) by admin.sibptus.tomsk.ru (8.14.3/8.14.3) with ESMTP id o8L93GNw036914 for ; Tue, 21 Sep 2010 16:03:17 +0700 (OMSST) (envelope-from sudakov@sibptus.tomsk.ru) Received: (from sudakov@localhost) by admin.sibptus.tomsk.ru (8.14.3/8.14.3/Submit) id o8L93GT9036913 for freebsd-questions@freebsd.org; Tue, 21 Sep 2010 16:03:16 +0700 (OMSST) (envelope-from sudakov@sibptus.tomsk.ru) X-Authentication-Warning: admin.sibptus.tomsk.ru: sudakov set sender to sudakov@sibptus.tomsk.ru using -f Date: Tue, 21 Sep 2010 16:03:16 +0700 From: Victor Sudakov To: freebsd-questions@freebsd.org Message-ID: <20100921090316.GA36655@admin.sibptus.tomsk.ru> Mail-Followup-To: Victor Sudakov , freebsd-questions@freebsd.org References: <20100920060811.GA10084@admin.sibptus.tomsk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Organization: AO "Svyaztransneft", SibPTUS X-PGP-Key: http://vas.tomsk.ru/vas.asc 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:03:20 -0000 Michael Powell wrote: > > > > When building apache22 from ports, would you recommend to enable or to > > disable threads support? > > > > Even more confusing is the fact that for ports/www/apache22 the default > > is: "Enable threads support in APR is off" (WITHOUT_THREADS=true) > > > > while for ports/devel/apr1 the default is: > > "Enable Threads in apr is on" (WITH_THREADS=true). > > > > Thank you in advance for any input. > > > > PS ports/devel/apr1 will also be used for the subversion client. > > > > I wouldn't mind someone with more apache22-fu to elaborate, correcting the > following if necessary. > > 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? [dd] > > 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)? -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN sip:sudakov@sibptus.tomsk.ru