Tom Jackson wrote:
I was looking at lighttpd performance (at http://trac.lighttpd.net/trac/wiki/Docs%3APerformance )

Considering how well AOLserver stands up to lighttpd, my question was why does lighttpd do better?

I was wondering if it had something to do with how aolserver does its writes, in particular the Ns_ConnFlushDirect|Ns_ConnWrite -> Ns_ConnSend -> NsConnSend -> DriverSend chain. Each connection thread writes to its own socket and loops to ensure that all the data is written. It seems at first glance that it would make more sense to hand the task of writing to the connection back to the driver thread once the connection thread is done with it, and the single driver thread could multiplex sending over multiple sockets with a single poll loop as well as leaving the connection threads free to do other work. This is the same as the stated rationale for the Ns_QueueWait api - "I/O events are cheap so do those upfront instead of having expensive connection threads burdened with wasteful blocking I/O" but on the writing side instead of the reading side.

Since this is such an obvious change, would I be correct in guessing that it was either tried and discarded as an overall performance loss (there would be alot of data being passed between threads meaning a lot of copying or extra mutexes if the connection thread and the driver thread both accessed the buffer concurrently), or rejected as an incompatible api change (Ns_ConnSend would do something subtly different, and I guess it could make it harder to detect an incompletely sent result)?

-J


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to