1 Sep 2002 01:54
Bucket management strategies for async MPMs?
Brian Pane <brianp <at> apache.org>
2002-08-31 23:54:20 GMT
2002-08-31 23:54:20 GMT
I've been thinking about strategies for building a
multiple-connection-per-thread MPM for 2.0. It's
conceptually easy to do this:
* Start with worker.
* Keep the model of one worker thread per request,
so that blocking or CPU-intensive modules don't
need to be rewritten as state machines.
* In the core output filter, instead of doing
actual socket writes, hand off the output
brigades to a "writer thread."
* As soon as the worker thread has sent an EOS
to the writer thread, let the worker thread
move on to the next request.
* In the writer thread, use a big event loop
(with /dev/poll or RT signals or kqueue, depending
on platform) to do nonblocking writes for all
open connections.
This would allow us to use a much smaller number of
worker threads for the same amount amount of traffic
(at least for typical workloads in which the network
write time constitutes the majority of each requests's
duration).
The problem, though, is that passing brigades between
(Continue reading)
RSS Feed