Sat 13 Feb 2010 07:44:26 PM UTC, original submission:
It looks that my ISP started to traffic shape the connection. It works like this:
- Using --limit-rate I specify maximum upload speed 75K (from 95K available). This is the only application accessing Internet.
- For approximately 10 minutes the wget works just fine and pulls at 75K/s. After that the rate drops to 30K/s. The drop is fast, looks like lights went off. I did not check in the sniffer what is going on, but I suspect that I will see dropped packets and TCP retransmissions.
- If I restart wget for the same file it returns to download at 70K/s for 10 minutes more.
This is not an issue with the server. I tried very fast servers including pulling Eclipse from Amazon cloud, rapidshare etc. The servers which usually saturated my downstream.
I patched the version 1.12 - see attached.
I did the patch in 1.12 (see end of the e-mail). I have added option and run the patched version for about 48 hours already. The patch can come handy if the target can be downloaded from different mirrors and the current server slows down for some reason.
Now my patch is rather ugly - i drop the connection by returning from fd_read_body() with negative return code. Still probably somebody will find it useful until there is official support for the feature. The full source code can be downloaded (GIT)
git clone git://git.assembla.com/wgetplus.git
If you think that the patch can be improved and eventually go into official release, than please, let me know. I will try to fix it.
|