Hi,
I tried prototyping this layout structure with multiple MPMs using sfw build
environment.
I modified sfw build scripts to build and install prefork, worker mpm binaries
under usr/apache2/bin directory.
First I built apr and apr-util libraries with --enable-threads option and then
built prefork followed by worker.
I have used different configure options for prefork and worker.
All the required modules are created during prefork mpm build (existing way).
For building worker mpm,
I did not include the extra module options used for prefork since only the
'httpd' binary from the worker build is copied to
usr/apache2/bin directory as httpd.worker. There is no need to build these
modules again.
All the modules that are generated during prefork build get installed under
usr/apache2/modules
(I have changed the directory name from "libexec" to "modules" which is more
intuitive).
I tested these 2 co-located mpms along with the prefork mpm (part of SXDE
installation) located under /usr/apache2.
First, I used torture script. Then I ran Apache Test suite. I have listed the
result of these runs.
Initially, some of the tests of Apache Test suite which passed for prefork mpm
failed (tests were hanging) for worker mpm.
It was failing in cgi module. By default, prefork mpm uses mod_cgi and worker
mpm uses mod_cgid. My build didn't have mod_cgid.
When I built and used cgid module, these tests passed for worker mpm and got
consistent results for co-located mpms and existing prefork mpm.
I have listed below, the configuration options used for building prefork and
mpm.
prefork:
./configure --prefix=/usr/apache2 \
--enable-layout=Solaris-Apache2 \
--enable-mods-shared=all \
--enable-so \
--enable-suexec \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
--enable-proxy-ajp \
--enable-proxy-balancer \
--enable-file-cache \
--enable-disk-cache \
--enable-cache \
--enable-mem-cache \
--enable-deflate \
--enable-cgi \
--enable-cgid \
--enable-ssl \
--with-ssl=/usr/sfw \
--with-apr=$(SRC)/cmd/apache2/httpd-prefork/$(VER)/srclib/apr \
--with-apr-util=$(SRC)/cmd/apache2/httpd-prefork/$(VER)/srclib/apr-util \
--with-mpm=prefork)
worker:
./configure --prefix=/usr/apache2 \
--enable-layout=Solaris-Apache2 \
--enable-mods-shared=all \
--enable-so \
--with-ssl=/usr/sfw \
--with-apr=$(SRC)/cmd/apache2/httpd-prefork/$(VER)/srclib/apr \
--with-apr-util=$(SRC)/cmd/apache2/httpd-prefork/$(VER)/srclib/apr-util \
--with-mpm=worker)
Test Resutls:
A) torture.pl script runs:
1) Running torture on co-located worker mpm
output:
-------
> ./torture.pl -c 3000 http://localhost:3000/index.html
** torture.pl version 1.05 starting at Wed Aug 8 01:43:47 2007
Transactions: 3000
Elapsed time: 43.836 sec
Bytes Transferred: 72000 bytes
Response Time: 15.00 sec
Transaction Rate: 68.44 trans/sec
Throughput: 1642.50 bytes/sec
Concurrency: 1026.7
Status Code 200: 3000
** torture.pl version 1.05 ending at Wed Aug 8 01:45:03 2007
2) Running torture on co-located prefork mpm
output:
-------
> ./torture.pl -c 1000 http://localhost:3000/index.html
** torture.pl version 1.05 starting at Wed Aug 8 02:04:06 2007
Transactions: 1000
Elapsed time: 171.426 sec
Bytes Transferred: 24000 bytes
Response Time: 65.32 sec
Transaction Rate: 5.83 trans/sec
Throughput: 140.00 bytes/sec
Concurrency: 381.1
Status Code 200: 1000
** torture.pl version 1.05 ending at Wed Aug 8 02:07:07 2007
> ./torture.pl -c 2000 http://localhost:3000/index.html
** torture.pl version 1.05 starting at Wed Aug 8 01:55:07 2007
Transactions: 2000
Elapsed time: 221.519 sec
Bytes Transferred: 38784 bytes
Response Time: 108.84 sec
Transaction Rate: 9.03 trans/sec
Throughput: 175.08 bytes/sec
Concurrency: 982.7
Status Code 200: 1616
Status Code 503: 384
** torture.pl version 1.05 ending at Wed Aug 8 01:59:10 2007
2) Running torture on original (the one that gets installed as part of OS
installation under /usr/apache2) prefork mpm
output:
-------
> ./torture.pl -c 1000 http://localhost:3000/index.html
** torture.pl version 1.05 starting at Thu Aug 2 03:25:22 2007
Transactions: 1000
Elapsed time: 168.460 sec
Bytes Transferred: 44000 bytes
Response Time: 57.37 sec
Transaction Rate: 5.94 trans/sec
Throughput: 261.19 bytes/sec
Concurrency: 340.6
Status Code 200: 1000
** torture.pl version 1.05 ending at Thu Aug 2 03:28:21 2007
./torture.pl -c 2000 http://localhost:3000/index.html
** torture.pl version 1.05 starting at Thu Aug 2 03:20:29 2007
Transactions: 2000
Elapsed time: 223.134 sec
Bytes Transferred: 69916 bytes
Response Time: 110.50 sec
Transaction Rate: 8.96 trans/sec
Throughput: 313.34 bytes/sec
Concurrency: 990.4
Status Code 200: 1589
Status Code 503: 411
** torture.pl version 1.05 ending at Thu Aug 2 03:24:33 2007
B) Apache Test suite runs: on co-located prefork, worker and original (the one
that gets installed as part of OS installation under /usr/apache2) prefork mpms
:
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/apache/errordoc.t 14 6 42.86% 2 4 6 10 12 14
t/modules/cache.t 3 3 100.00% 1-3
t/modules/include.t 86 6 6.98% 4-6 47-48 53
t/modules/proxy.t 13 12 92.31% 1-8 10-13
t/modules/proxy_balancer.t 1 1 100.00% 1
t/modules/vhost_alias.t 8 8 100.00% 1-8
t/protocol/nntp-like.t 255 65280 5 8 160.00% 2-5
t/security/CVE-2006-5752.t 2 1 50.00% 2
11 tests and 14 subtests skipped.
Failed 8/66 test scripts, 87.88% okay. 41/2421 subtests failed, 98.31% okay.
The modified part of the layout looks like this:
proto/root_i386/usr/apache2/bin/httpd.worker
proto/root_i386/usr/apache2/bin/httpd
proto/root_i386/usr/apache2/bin/apr-1-config
proto/root_i386/usr/apache2/bin/apu-1-config
proto/root_i386/usr/apache2/bin/htpasswd
proto/root_i386/usr/apache2/bin/htdigest
proto/root_i386/usr/apache2/bin/rotatelogs
proto/root_i386/usr/apache2/bin/logresolve
proto/root_i386/usr/apache2/bin/ab
proto/root_i386/usr/apache2/bin/checkgid
proto/root_i386/usr/apache2/bin/htdbm
proto/root_i386/usr/apache2/bin/htcacheclean
proto/root_i386/usr/apache2/bin/httxt2dbm
proto/root_i386/usr/apache2/bin/apxs
proto/root_i386/usr/apache2/bin/apachectl
proto/root_i386/usr/apache2/bin/dbmmanage
proto/root_i386/usr/apache2/bin/envvars-std
proto/root_i386/usr/apache2/bin/envvars
proto/root_i386/usr/apache2/bin/suexec.disabled
proto/root_i386/usr/apache2/modules
proto/root_i386/usr/apache2/modules/mod_auth_gss.so
proto/root_i386/usr/apache2/modules/mod_authn_file.so
proto/root_i386/usr/apache2/modules/mod_authn_dbm.so
proto/root_i386/usr/apache2/modules/mod_authn_anon.so
proto/root_i386/usr/apache2/modules/mod_authn_dbd.so
proto/root_i386/usr/apache2/modules/mod_authn_default.so
proto/root_i386/usr/apache2/modules/mod_authz_host.so
proto/root_i386/usr/apache2/modules/mod_authz_groupfile.so
proto/root_i386/usr/apache2/modules/mod_authz_user.so
proto/root_i386/usr/apache2/modules/mod_authz_dbm.so
proto/root_i386/usr/apache2/modules/mod_authz_owner.so
proto/root_i386/usr/apache2/modules/mod_authz_default.so
proto/root_i386/usr/apache2/modules/mod_auth_basic.so
proto/root_i386/usr/apache2/modules/mod_auth_digest.so
proto/root_i386/usr/apache2/modules/mod_file_cache.so
proto/root_i386/usr/apache2/modules/mod_cache.so
proto/root_i386/usr/apache2/modules/mod_disk_cache.so
proto/root_i386/usr/apache2/modules/mod_mem_cache.so
proto/root_i386/usr/apache2/modules/mod_dbd.so
proto/root_i386/usr/apache2/modules/mod_dumpio.so
proto/root_i386/usr/apache2/modules/mod_ext_filter.so
proto/root_i386/usr/apache2/modules/mod_include.so
proto/root_i386/usr/apache2/modules/mod_filter.so
proto/root_i386/usr/apache2/modules/mod_deflate.so
proto/root_i386/usr/apache2/modules/mod_log_config.so
proto/root_i386/usr/apache2/modules/mod_log_forensic.so
Please share your thoughts on this new layout & build options.
Thanks and Regards,
Seema.
Sriram Natarajan wrote:
> Hi
> I just posted my thoughts on as to how Apache 2.2.4 file layout could
> look so as to support multiple MPM support as part of our SAMP stack
> effort within SXDE. I would very much appreciate, if you could take a
> moment to review this proposal and let us know your concerns / suggestions.
>
> Here is the url
> http://www.opensolaris.org/jive/thread.jspa?threadID=36272
>
>
> Thanks in advance
> sriram
> _______________________________________________
> webstack-discuss mailing list
> webstack-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/webstack-discuss