On Sat, 2005-02-05 at 18:49 -0800, Tom Jackson wrote: >On Saturday 05 February 2005 18:19, Andrew Piskorski wrote: > > > How does the "aggressive read ahead model" Jim Davidson introduced in > > AOLserver 4.0 work? Why is it better for HTTP than what other web > > servers do, like AOLserver 3.x, Apache 1.x and 2.x, etc.? If, how, > > and why is this model un-suitable for non-HTTP traffic? > > I believe you are talking about the iovec scatter/gather method, which > reads/writes from multiple buffers in a single call. It should be much faster > for a lot of applications, especially UDP. Likely you have to change one line > of code to change nssock into a UDP module (of course it might be nice to do > that from a config file setting, which is probably what Vlad did if he has > written a SIP server). > I don't think the application level cares about the read ahead.
AOLserver doesn't do scatter/gather IO. Read-ahead refers to the driver thread accepting new connections and reading data from the socket before passing it to a connection thread to run. This beneficially prevents precious connection threads from blocking for data as it dribbles in over a 14k modem. Read-ahead is more aggressive in 4.0 because it reads the entire request, not just the request line and headers as was the case in 3.x. That's why the new upload limit of 2MB which caught a lot of people out was introduced. If you increase the upload limit to a more reasonable 20MB you may open yourself up to a denial of service attack. An attacker could open many connections to your server, send 19.9MB on each, and keep the connection open by sending 1 byte at a time. With just 100 connection threads the 2GB address space limit on a typical 32bit machine will be exhausted and your server will crash. Version 4.1 in CVS addresses this by creating a temporary file to dump excess data to. But writing to disk is a blocking operation, and while the driver thread is blocked, no new connections are accepted and no read-ahead occurs, killing the advantage of AOLserver's hybrid blocking/non-blocking model. -- 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.
