Earlier this year (sometime in February) I described a problem I had with
file uploads taking excessively long time within an intranet environment,
with effective speeds 750-800Kbit/sec on a 100MBit/s ethernet.
This week I spent some time investigating the problem further.
My initial suspicion was that IOBuffers are not really allocated and we end-up reading only a few characters at a time. After checking the socket
read/write code in AOLServer (using printf statements) my initial
hypothesis was overulled (buffer allocation works OK!).
To cut a long story short, I found out that the culprit was the Silly
Window Syndrome (SWS, see Stevens, Vol.1) exhibited by the TCP stack in
WinNT4 clients when sending bulk data to the web server (the IE and
Netscape browsers may also be at fault here).
The work-around was to change the tcp_deferred_ack_interval
parameter in
Solaris 8; this parameter indicates the delay in milliseconds before
sending a deferred ACK (the default for windows is 200ms, for Solaris 8 is
100 ms and for most linux distributions 50ms; I set it to 10ms and the file
uploads are 10 times faster!).
I believe the new low value of 10ms is OK for LANs (where RTT for TCP
packets are less than 10ms) but it may not work for WANs.
I hope that anybody who would like to speed-up file uploads to AOLServer
may find this information useful.