httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <>
Subject Re: gettimeofday calls
Date Fri, 24 Jan 2003 19:53:59 GMT
Bill Stoddard wrote:

>> 1. Why we need to do the apr_stat() for static files each time the 
>> request
>> comes in - can it be done during the module_init() phase, and the 
>> values put
>> in a array of some sort. ?.
> Files change. Why not use mod_file_cache? It will (or should if it does 
> not have a bug) eliminate the stat.  

On my wimpy 200MHz server, the SPEC file_set contains 5760 files and uses .8G of 
disk.  On more modern servers, the size of the file_set goes up in proportion to 
the number of conforming connections you hope to push thru it, so figure 57,600 
files and 8G of space on a 2GHz server.  8G isn't going to fit into one 
process's virtual memory on a Pentium; caching 57,600 fd's is going to be a 
challenge too, as I think Madhu is finding out.

>    Or we could  spend time rewriting 
> code to just do an open (followed by a less expensive fstat) rather than 
> a stat/open.

That sounds like a winner, especially for the standard dynamic GETs handled 
within mod_specweb99.  At ApacheCon, OtherBill mentioned that Win32 does have 
something like fstat and that we have apr support for it already.

But for static GETs, that means changing directory_walk, apr, and/or maybe the 
handlers.  I suppose it could be done if you hid the fd in apr somewhere until 
the apr_file_open came along.


View raw message