Date: Wed, 03 Sep 2008 15:04:06 -0400 From: Michael Powell <nightrecon@verizon.net> To: freebsd-questions@freebsd.org Subject: Re: [6.3/Apache22] Right way to compile worker MPM? Message-ID: <g9mmur$ocu$1@ger.gmane.org> References: <cgdtb4lqkv4tn2vtv7o117n9oab3aispiu@4ax.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?g9mmur$ocu$1>