In a message dated 4/7/2001 12:04:07 AM Eastern Daylight Time,
[EMAIL PROTECTED] writes:


> Check http://www.acme.com/software/thttpd/benchmarks.html and look
> at the graph at the bottom.  There is a discussion of sending http
> headers out separate from the data, which is (I believe) what AOLServer
> does.  This throttles performance because of TCP/IP "slow start" and
> the TCP/IP Nagle.
>
> There is a feature on Linux called TCP_CORK, or something like that,
> that tells TCP/IP to not send out partial packets.  This lets you
> do multiple writes without triggering tcp's "slow start".
>
> The other suggestion I've seen is to do writev and write the header
> and data buffers in one call to avoid the same problem.  This may
> affect the Ns_ API to some degree and might take more effort to
> implement transparently.
>
> I haven't done the thttpd benchmarks with AS, so don't know for sure
> that it suffers from the same problem.
>



This makes sense.  Turns out at AOL we often use dedicated single-threaded
servers for the static content which is really just the images on the pages.
These servers are very aggressive with scatter/gather I/O (i.e.,
readv/writev, recvmsg/sendmsg) and handle about 8000k conns/second or so.

I have some ideas on both minimizing the data copying and the number of
socket I/O's in 4.x.  Basically, have ConstructHeaders dump content into a
dstring in the Conn, delay the flush, append the ADP output after encoding to
the same dstring, and blast all at once.

Question is:  If these changes go in, how can we test?  Anyone have a good,
reliable test bed and interested in doing the tests?

-Jim

Reply via email to