httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject Re: FW: Apache Optimization - Post-graduate Research
Date Fri, 28 Sep 2001 00:39:47 GMT
dean gaudet wrote:

>
>On Wed, 26 Sep 2001, Brian Pane wrote:
>
>>I characterize Apache's performance as being limited by two very
>>different classes of factors:
>>
>>  * Architectural factors -- e.g., a thread-per-connection server
>>    generally will be slower than an event-loop server.
>>
>
>another way to think of these is as the constants which are hidden by the
>O() notation.  the architecture is OK in a theoretical sense, but there
>are some really really big constants hidden in the O()s that we'd use to
>describe the architecture.
>

I like that constant-factor description because it nicely captures the other
big way in which httpd performance has improved over time: As key operations
in the OS get more efficient (quicker context switches, for example, or
zero-copy sendfile), the constant factor drops.

>>  * Implementation factors -- e.g., using O(n)-time algorithms where
>>    O(log(n)) is possible, or making extraneous system calls.
>>
>
>if you know of any cases where an O(n) -> O(log(n)) change can be made i'd
>like to hear about them...
>

request_rec->headers_in

apr_table_t in general: aside from the HTTP headers, the O(n) "set" 
functions
result in an O(n^2) cost for things that need to insert n items into 
subprocess_env
(mod_include, CGIs).

Maybe ap_find_command_in_modules() too (possibly useful in speeding up 
.htaccess
file processing)

There are various places where we may be able to go from O(n) to O(1) by
optimizing away strdup() calls.

--Brian



Mime
View raw message