Did a simple (minded) test: fired up apache 2.0 on my AIX machine using the
threaded MPM. Turned logging off and tuned the thread/process limits to
suitable numbers then ran:

ab -n 2000 -c 10 machine/500bytefile.html.

Results:
~510 cps
~700 cps using mod_file_cache

Same test with iPlanet 4.1 on the same machine:
Results:
~1200 cps

Apache 1.3 is a bit faster on my machine.  So, taking 1.3, I...
1. disabled lingering_close
2. disabled getsockname
3. disabled the call to ap_bhalfduplex() (replaced it with a simple
ap_bflush())
4. optimize the call to time()
5. eliminate the call to disable nagle (AIX inherits this from the listening
socket)
6. enabled SINGLE_LISTENER_UNSERIALIZED_ACCEPT
7. mmap static the file
8. eliminated the calls to manipulate sigusr1

and was able to get Apache 1.3 up to ~1000 cps. We were basically doing
accept(), read(), write(), close().

Apache 2.0 already essentially has the optimization to ap_bhalfduplex. That
is, we do not check for a pipelined request if the connection is not
keep-alive.  The threaded MPM shutdown mechanism (pipe-of-death) prevents us
from using the SINGLE_LISTENER_UNSERIALIZED_ACCEPT optimization (this is
a -big- performance hit for this only somewhat specialized case).

Bill

Reply via email to