perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: double mod_perl initialization
Date Sun, 27 Sep 2009 05:24:09 GMT
You can find changes about graceful restarts in many of the
version release notes in apache2.  My memory is that 2.2.11
was OK for me.

Letter -Os means "optimize for size":

is the oldest gcc manual I could find, so the option has been
around for a long time.

On many compilers (including apparently gcc-x86) it also does
better on speed, unless you use -O3 which can inline your
memory size up.  You want to get a compiler guy annoyed,
suggest that his compiler's "optimize for size" is faster
than its "opt for speed".

For building perl, you add '-Doptimize=-Os' to the Configure
command line.

For building Apache, you put '-Os' in CFLAGS at configure time
(possibly with other CFLAGS you may like).

mod_perl inherits it from perl or apache.
Other XS (C) modules inherit it from perl.
You can see either -O or -g (debugging) in most cc commands.

I tried -Os last week on my one CPAN module (ExtUtils::MakeMaker
suggests it).  It took the size down between 10% and 15%.  The
perl binary shrank in that range too.  The impact on the httpd
process size is less, but there's lots of data in there.

So far there's also less in my error_log, but that's probably
coincidence :-)


On Sep 26, 2009, at 10:36 AM, Clinton Gormley wrote:

>> You are 4 releases behind.  Download 2.2.13 and I bet graceful will
>> work for you.  (Bet's off if you have something systemically  
>> difficult
>> w/r/t ssl.)
> It appears that you may be right:
> Changes with Apache 2.2.12
> *) prefork: Fix child process hang during graceful restart/stop in
>      configurations with multiple listening sockets.  PR 42829.   
> [Joe Orton,
>      Jeff Trawick]
> Nice! Will try it out when I have a chance.
>> Throw in a mod_perl 2.0.5 from SVN: I've never seen such performance
>> as the system I built with 'optimize -Os' last night.
> What does this do and how are you specifying it? I don't see any  
> mention
> of it in the docs for mod_perl or perl. Is that zero-s or oh-s?

View raw message