Chapter 15. Improving Performance Through Build Options
It’s important how you build mod_perl-enabled Apache. The build process influences the size of the httpd executable—for example, some irrelevant modules might slow down performance.
When you build Apache, it strips the debug symbols by default, so you don’t have to strip them yourself. For production use, you definitely shouldn’t build mod_perl with debugging options enabled. Apache and mod_perl do not add these options unless you explicitly require them. In Chapter 21 we talk about debug build options in detail.
Server Size as a Function of Compiled-in Features
You might wonder if it’s better to compile in only the required modules and mod_perl hooks, or if it doesn’t really matter. To answer this question, let’s first make a few compilations and compare the results.
We’ll build mod_perl starting with:
panic% perl Makefile.PL APACHE_SRC=../apache_1.3.x/src \
DO_HTTPD=1 USE_APACI=1and followed by one of these option groups, in turn:
Default (no arguments)
Minimum:
APACI_ARGS='--disable-module=env, \ --disable-module=negotiation, \ --disable-module=status, \ --disable-module=info, \ --disable-module=include, \ --disable-module=autoindex, \ --disable-module=dir, \ --disable-module=cgi, \ --disable-module=asis, \ --disable-module=imap, \ --disable-module=userdir, \ --disable-module=access, \ --disable-module=auth'mod_perl’s
EVERYTHING:EVERYTHING=1
mod_perl’s
EVERYTHINGand debug:EVERYTHING=1 PERL_DEBUG=1
After recompiling with the arguments ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access