Please correct me this summary is incorrect:
- Your
multi-threaded
client will start a thread that connects to the server and issues just oneHTTP GET
then that thread closes. - When you say 1, 2, 5, 10, 50 threads, you're just referring to how many concurrent threads you allow, each thread itself only handles one request
- Your client takes between 2 and 5 minutes to download over 1000 images
- Firefox and Opera will download an equivalent data set in 40 seconds
I suggest that the server rate-limits http connections, either by the webserver daemon itself, a server-local firewall or most likely dedicated firewall.
You are actually abusing the webservice by not re-using the HTTP Connections for more than one request and that the timeouts you experience are because your SYN FLOOD
is being clamped.
Firefox and Opera are probably using between 4 and 8 connections to download all of the files.
If you redesign your code to re-use the connections you should achieve similar performance.
MattH
2010-03-10 09:00:58