From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 19:02:03 2008 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 79E581065671 for ; Wed, 3 Sep 2008 19:02:03 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3515C8FC1E for ; Wed, 3 Sep 2008 19:02:02 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Kaxc4-00037b-Js for freebsd-questions@freebsd.org; Wed, 03 Sep 2008 19:01:56 +0000 Received: from pool-141-156-180-91.esr.east.verizon.net ([141.156.180.91]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Sep 2008 19:01:56 +0000 Received: from nightrecon by pool-141-156-180-91.esr.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Sep 2008 19:01:56 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Michael Powell Date: Wed, 03 Sep 2008 15:04:06 -0400 Lines: 52 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-141-156-180-91.esr.east.verizon.net Sender: news Subject: Re: [6.3/Apache22] Right way to compile worker MPM? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nightrecon@verizon.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2008 19:02:03 -0000 Gilles wrote: > Hello > > I'm trying to compile the latest ports of Apache22 with support for > the worker MPM so that each child process spawns thread. I'd like to > see if performance improves compared to the prefork model. > > Although I checked the "THREADS/Enable threads support in APR" item in > "make config", the resulting binary says this: This has nothing to do with enabling worker. > # pkg_info | grep apache > apache-2.2.9_3 Version 2.2.x of Apache web server with prefork > MPM. apachectl -l will also list the core modules built in at compile time. > Should I edit the makefile file manually to get worked MPM? > No need. Edit /etc/make.conf. Example from mine: #For Apache-2.2.9 Build WITH_MPM=event WITH_THREADS=yes WITHOUT_AUTHN_MODULES=yes WITH_CUSTOM_AUTHZ=authz_host WITHOUT_DAV_MODULES=yes WITHOUT_LDAP_MODULES=yes #WITH_PROXY_MODULES=yes #WITHOUT_SUEXEC_MODULES=yes WITH_THREADS_MODULES=yes WITH_CACHE_MODULES=yes WITH_SSL_MODULES=yes WITH_AUTH_MODULES=yes WITH_MISC_MODULES=yes WITH_CUSTOM_EXPERIMENTAL=ext_filter You can still adjust overrides for some of these items in the make config command, IIRC. It can also be passed on the command line, but I do this so subsequent portupgrades reproduce the build environment automagically. Of course, you'll want worker instead of event. I'm just giving event a look see. One problem is that worker/event mpm is not recommended for use with mod_php as some pieces of PHP is not thread safe. So running PHP as FastCGI with mod_fcgid is what I'm currently playing around with for test purposes. YMMV -Mike