You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@bellsouth.net> on 2000/06/05 14:01:13 UTC

Re: [PATCH] mod_mmap_static for 2.0

> Date: Fri, 26 May 2000 17:08:20 -0400
> From: Greg Ames <gr...@raleigh.ibm.com>
> 
> mod_mmap_static is working on 2.0 on Linux.  I did it in three passes:
> 
> 1. APR-ize the local finfo and add finfo.device to APR
> 2. Get the translate_name phase to run so we can bypass the ap_stat
> in             get_path_info.
> 3. Pass the results of xlat's bsearch to the handler via
> r->request_config, to                avoid a second bsearch on the inode
> address.  With this change, it no longer             needs finfo.device
> in APR.
> 
> Here's the results, using ab on my ThinkPad to serve up
> localhost/apache_pb.gif, with 3 runs for each executable:
> 
> +----------------------+---------+---------+---------+
> |  run type            | run 1   | run 2   | run 3   |       
> |                      | thruput | thruput | thruput |  
> +----------------------+---------+---------+---------+ 
> | baseline             | 2183.88 | 2193.46 | 2199.74 | 
> | (no mod_mmap_static) |         |         |         |
> +----------------------+---------+---------+---------+ 
> | APR-ized             | 2436.94 | 2387.77 | 2490.35 |
> +----------------------+---------+---------+---------+
> | working xlat         | 2600.10 | 2569.04 | 2586.65 |
> |  (avoids ap_stat)    |         |         |         |
> +----------------------+---------+---------+---------+
> | single bsearch       | 2658.87 | 2629.16 | 2609.26 |
> +----------------------+---------+---------+---------+ 
> 
> Getting the translate_name phase to work was a royal PITA. The core's
> translate_name phase needs to run first and decide the URI is OK.  I
> don't know how to do that using the new hook system without changing the
> hook macro from _RUN_FIRST to _RUN_ALL, which seems like a Bad Thing in
> the overall scheme of things.  I don't want to copy the core xlat
> routine ala mod_file_cache because that may cause extra maintenance in
> the future.  So I exported core_translate's entry port (namespace
> protected) and just call it.
> 
> This hasn't been tested on OS/390 yet because I'm still fighting with
> the config system to convince it that mmap exists/works.
> 
> comments?  concerns?
> 
> Thanks,
> Greg Ames

I'm going to commit this patch in the next day or so, unless somebody
speaks up beforehand.  The only possibly controversial issue is the
exportation (a word?) of core_translate().  I think this could be used
by Bill Stoddard's mod_file_cache (sp?) too.
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: [PATCH] mod_mmap_static for 2.0

Posted by dean gaudet <dg...@arctic.org>.

On Sun, 11 Jun 2000, Greg Stein wrote:

> Semantically, you translate a URL to its intended meaning "once", so I don't
> think we can change it to "run all".
> 
> mod_mmap_static needs a new hook, it should find a different hook to do
> its magic, or the ap_core_translate() function needs a new name. (not sure
> which is Best)

the only reason it wants in there at that phase is to prevent the core
from doing unneeded stats.  that's probably a more interesting problem to
solve.

-dean


Re: [PATCH] mod_mmap_static for 2.0

Posted by Greg Stein <gs...@lyra.org>.
On Sun, Jun 11, 2000 at 04:08:19PM +0100, Ben Laurie wrote:
> Bill Stoddard wrote:
> > 
> > > > I'm going to commit this patch in the next day or so, unless somebody
> > > > speaks up beforehand.  The only possibly controversial issue is the
> > > > exportation (a word?) of core_translate().  I think this could be used
> > > > by Bill Stoddard's mod_file_cache (sp?) too.
> > >
> > > i thought one of the things about ben l's hook stuff was that you could
> > > make the priority of the mod_mmap_static translation phase lower than the
> > > core -- which would have the same effect as calling core_translate().
> > 
> > The translate hook is RUN_FIRST hook, so when core_translate runs, that's it. No other hooks are
> > run. I putzed around with this a some in my mod_file_cache but I didn't see an obvious clean
> > solution.
> 
> Is there any reason it shouldn't run them all, though? Now they can be
> ordered it makes more sense than in the old days.
> 
> 'course the thing that will lead to is a need to set ordering
> configurably - but that would be cool.

Semantically, you translate a URL to its intended meaning "once", so I don't
think we can change it to "run all".

mod_mmap_static needs a new hook, it should find a different hook to do
its magic, or the ap_core_translate() function needs a new name. (not sure
which is Best)

Personally, I think this all falls into the bucket of "repository
independence" -- being able to use stuff other than the filesystem for the
source content. e.g. yank content from a database or from a socket. I'd
think that mod_mmap_static would install a different type of source.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: [PATCH] mod_mmap_static for 2.0

Posted by Ben Laurie <be...@algroup.co.uk>.
Bill Stoddard wrote:
> 
> > >
> > > I'm going to commit this patch in the next day or so, unless somebody
> > > speaks up beforehand.  The only possibly controversial issue is the
> > > exportation (a word?) of core_translate().  I think this could be used
> > > by Bill Stoddard's mod_file_cache (sp?) too.
> >
> > i thought one of the things about ben l's hook stuff was that you could
> > make the priority of the mod_mmap_static translation phase lower than the
> > core -- which would have the same effect as calling core_translate().
> 
> The translate hook is RUN_FIRST hook, so when core_translate runs, that's it. No other hooks are
> run. I putzed around with this a some in my mod_file_cache but I didn't see an obvious clean
> solution.

Is there any reason it shouldn't run them all, though? Now they can be
ordered it makes more sense than in the old days.

'course the thing that will lead to is a need to set ordering
configurably - but that would be cool.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

Coming to ApacheCon Europe 2000? http://apachecon.com/

Re: [PATCH] mod_mmap_static for 2.0

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Jun 09, 2000 at 10:35:00AM -0400, Bill Stoddard wrote:
> > >
> > > I'm going to commit this patch in the next day or so, unless somebody
> > > speaks up beforehand.  The only possibly controversial issue is the
> > > exportation (a word?) of core_translate().  I think this could be used
> > > by Bill Stoddard's mod_file_cache (sp?) too.
> >
> > i thought one of the things about ben l's hook stuff was that you could
> > make the priority of the mod_mmap_static translation phase lower than the
> > core -- which would have the same effect as calling core_translate().
> 
> The translate hook is RUN_FIRST hook, so when core_translate runs, that's it. No other hooks are
> run. I putzed around with this a some in my mod_file_cache but I didn't see an obvious clean
> solution.

I just checked an item into STATUS with a couple possible solutions.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: [PATCH] mod_mmap_static for 2.0

Posted by Bill Stoddard <re...@attglobal.net>.
> >
> > I'm going to commit this patch in the next day or so, unless somebody
> > speaks up beforehand.  The only possibly controversial issue is the
> > exportation (a word?) of core_translate().  I think this could be used
> > by Bill Stoddard's mod_file_cache (sp?) too.
>
> i thought one of the things about ben l's hook stuff was that you could
> make the priority of the mod_mmap_static translation phase lower than the
> core -- which would have the same effect as calling core_translate().

The translate hook is RUN_FIRST hook, so when core_translate runs, that's it. No other hooks are
run. I putzed around with this a some in my mod_file_cache but I didn't see an obvious clean
solution.

Bill


Re: [PATCH] mod_mmap_static for 2.0

Posted by rb...@covalent.net.
> > I'm going to commit this patch in the next day or so, unless somebody
> > speaks up beforehand.  The only possibly controversial issue is the
> > exportation (a word?) of core_translate().  I think this could be used
> > by Bill Stoddard's mod_file_cache (sp?) too.
> 
> i thought one of the things about ben l's hook stuff was that you could
> make the priority of the mod_mmap_static translation phase lower than the
> core -- which would have the same effect as calling core_translate().

I ignored this thread the first time through because I was doing other
stuff, but I agree with Dean.  We should not need to export a hook from
the core anymore, because it is perfectly possible/reasonable to just
install your hook after the core's.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: [PATCH] mod_mmap_static for 2.0

Posted by dean gaudet <dg...@arctic.org>.
On Mon, 5 Jun 2000, Jeff Trawick wrote:

> > Date: Fri, 26 May 2000 17:08:20 -0400
> > From: Greg Ames <gr...@raleigh.ibm.com>
>
> I'm going to commit this patch in the next day or so, unless somebody
> speaks up beforehand.  The only possibly controversial issue is the
> exportation (a word?) of core_translate().  I think this could be used
> by Bill Stoddard's mod_file_cache (sp?) too.

i thought one of the things about ben l's hook stuff was that you could
make the priority of the mod_mmap_static translation phase lower than the
core -- which would have the same effect as calling core_translate().

-dean


Re: [PATCH] mod_mmap_static for 2.0

Posted by Jeff Trawick <tr...@bellsouth.net>.
> From: rbb@covalent.net
> Date: Mon, 5 Jun 2000 07:40:47 -0700 (PDT)
> 
> > I'm going to commit this patch in the next day or so, unless somebody
> > speaks up beforehand.  The only possibly controversial issue is the
> > exportation (a word?) of core_translate().  I think this could be used
> > by Bill Stoddard's mod_file_cache (sp?) too.
> 
> Please wait until after the alpha today.
> 
> Ryan

Definitely!

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: [PATCH] mod_mmap_static for 2.0

Posted by rb...@covalent.net.
> I'm going to commit this patch in the next day or so, unless somebody
> speaks up beforehand.  The only possibly controversial issue is the
> exportation (a word?) of core_translate().  I think this could be used
> by Bill Stoddard's mod_file_cache (sp?) too.

Please wait until after the alpha today.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------