httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: remaining CPU bottlenecks in 2.0
Date Sun, 09 Sep 2001 21:45:24 GMT
dean gaudet wrote:

>On Tue, 4 Sep 2001, Brian Pane wrote:
>>* Collectively, stat and open comprise 5% of the total CPU time.
>>  It would be faster to do open+fstat rather than stat+open (as
>>  long as the server is delivering mostly 200s rather than 304s),
>>  but that might be too radical a change.  Anybody have thoughts
>>  on this?
>linux' dcache makes either method about the same cost, but on other
>kernels, and especially when NFS is involved (because of how NFS path
>resolution occurs), the open/fstat is much better.  the trick would be to
>cache open filehandles so that fstat can be used.
I realized that it's now possible to do open+fstat in 2.0 even without
changes to the core: just create a custom module consisting of a
map_to_storage function that bypasses directory_walk() and a handler
that does apr_file_open() and apr_file_info_get().  I tried a prototype
this morning and found that it "does the right thing": no stats, just
open followed by fstat.

This approach isn't suitable for all users, of course.  It's not
very useful for people who depend on directory_walk(). :-)  But
for sites delivering a lot of traffic from NFS filesystems, using this
technique in a custom module could substantially reduce NFS server load.

View raw message