You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by André Malo <nd...@perlig.de> on 2003/07/31 04:41:07 UTC

strip rewritelog functionality per compiler option

On high-traffic production sites it is unlikely that RewriteLog will ever be
used, so it may be desirable to strip the code entirely per compiler option
from mod_rewrite.
This shortens the binary (here, DSO) about 10k and saves a lot of cycles
(because there's still some logic there, even if RewriteLog is turned off).

A patch could look like the attached one. What do you think? Objections
anyone?

Thanks, nd

Re: strip rewritelog functionality per compiler option

Posted by Mads Toftum <ma...@toftum.dk>.
On Fri, Aug 01, 2003 at 01:11:42PM -0700, Justin Erenkrantz wrote:
> I'd support removing RewriteLog entirely in 2.1.
> 
> If mod_rewrite has an error, it needs to go to the main errorlog.  We did 
> the same with mod_ssl a while back.  -- justin

The RewriteLog is no ordinary error log, just like SSLLogLevel trace weren't.
The purpose is to debug things that might not do exactly as expected, not
just plain error logging. 
I didn't like the fact that the ssl log went into the common error log for
just that reason, but to do the same to the RewriteLog would be even more
of a PITA.
</rant>

vh

Mads Toftum
-- 
`Darn it, who spiked my coffee with water?!' - lwall


Re: strip rewritelog functionality per compiler option

Posted by David Burry <db...@tagnet.org>.
I agree entirely, as the documentation says, rewrite rules
are "voodoo" and often very hard to understand what's going
on and why a given ruleset isn't working as expected (which
is not the same as an error in the errorlog, more of a user
error).  The inability to trace through what it's doing in
the rewritelog would have made many of my past interesting
rulesets impossible to create.  Taking it out of production
sites is a great optimization, but definitely not a good
thing for site development.

Dave


On Fri, 1 Aug 2003 22:55:31 +0100
 Thom May <th...@planetarytramp.net> wrote:
> * Justin Erenkrantz (justin@erenkrantz.com) wrote :
> > I'd support removing RewriteLog entirely in 2.1.
> > 
> -1 ; As Mads says, RewriteLog is used for debugging only,
> not for day-to-day
> logging. This is why Andre proposed the patch, on the
> basis that production
> sites can remove the functionality entirely, but dev
> sites that need to know
> what the hell the module is doing can still work it out.
> Removing RewriteLog entirely would make life a living
> hell.
> -Thom


Re: strip rewritelog functionality per compiler option

Posted by Thom May <th...@planetarytramp.net>.
* Justin Erenkrantz (justin@erenkrantz.com) wrote :
> --On Thursday, July 31, 2003 04:41:07 +0200 André Malo <nd...@perlig.de> wrote:
> 
> >On high-traffic production sites it is unlikely that RewriteLog will ever
> >be used, so it may be desirable to strip the code entirely per compiler
> >option from mod_rewrite.
> 
> I'd support removing RewriteLog entirely in 2.1.
> 
-1 ; As Mads says, RewriteLog is used for debugging only, not for day-to-day
logging. This is why Andre proposed the patch, on the basis that production
sites can remove the functionality entirely, but dev sites that need to know
what the hell the module is doing can still work it out.
Removing RewriteLog entirely would make life a living hell.
-Thom

Re: strip rewritelog functionality per compiler option

Posted by André Malo <nd...@perlig.de>.
* Justin Erenkrantz wrote:

> --On Thursday, July 31, 2003 04:41:07 +0200 André Malo <nd...@perlig.de> wrote:
> 
>> On high-traffic production sites it is unlikely that RewriteLog will ever
>> be used, so it may be desirable to strip the code entirely per compiler
>> option from mod_rewrite.
> 
> I'd support removing RewriteLog entirely in 2.1.
> 
> If mod_rewrite has an error, it needs to go to the main errorlog.  We did
> the same with mod_ssl a while back.  -- justin

Hmm, errors are already written into the errorlog. The rewritelog is mostly
useful for debugging purposes (both for code and rulesets). Therefore I'd
leave it in by default. But as said, running production sites, or webspace
providers, where the user don't have httpd.conf access probably want to strip
it out.

nd

Re: strip rewritelog functionality per compiler option

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Thursday, July 31, 2003 04:41:07 +0200 André Malo <nd...@perlig.de> wrote:

> On high-traffic production sites it is unlikely that RewriteLog will ever
> be used, so it may be desirable to strip the code entirely per compiler
> option from mod_rewrite.

I'd support removing RewriteLog entirely in 2.1.

If mod_rewrite has an error, it needs to go to the main errorlog.  We did 
the same with mod_ssl a while back.  -- justin

Re: strip rewritelog functionality per compiler option

Posted by Mads Toftum <ma...@toftum.dk>.
On Thu, Jul 31, 2003 at 04:41:07AM +0200, André Malo wrote:
> On high-traffic production sites it is unlikely that RewriteLog will ever be
> used, so it may be desirable to strip the code entirely per compiler option
> from mod_rewrite.

I agree that this is probably a good optimization, and that RewriteLog does
not have any uses on a production server. So I agree to this patch in
concept (even if I can't help hoping that this is something that will not
be turned off in binary distributions).

vh

Mads Toftum
-- 
`Darn it, who spiked my coffee with water?!' - lwall


Re: strip rewritelog functionality per compiler option

Posted by Ian Holsman <Ia...@apache.org>.
André Malo wrote:
> On high-traffic production sites it is unlikely that RewriteLog will ever be
> used, so it may be desirable to strip the code entirely per compiler option
> from mod_rewrite.

-0 from me.

from a high-traffic site's perspecitve, I don't think we would use this 
option.

we use the rewritelog directive for debugging sometimes, and having a 
common binary makes our lives a bit easier.

the only thing that someone noticed over here is that the file is opened 
if the directive is present, which is kinda annoying.

are you seeing some performance problems here?


Cheers
Ian

FWIW.. our main webservers are usually run with light loads, to help 
handle flash crowds, and to have some breathing room when network/other 
hiccups occur in our environment



> This shortens the binary (here, DSO) about 10k and saves a lot of cycles
> (because there's still some logic there, even if RewriteLog is turned off).
> 
> A patch could look like the attached one. What do you think? Objections
> anyone?
> 
> Thanks, nd
>