Bug 169634 - wget goes over limit-rate after sleep
Summary: wget goes over limit-rate after sleep
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: wget
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-09-30 14:35 UTC by David Fraser
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: fc5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-26 10:39:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Fraser 2005-09-30 14:35:32 UTC
Description of problem:
If I run wget with --limit-rate=10K and the HTTP connection gets closed, then
when it retries, it seems to go over the limit for a while before returning back
to the limit.


Version-Release number of selected component (if applicable):
wget-1.9.1-22 on Fedora Core 4, which says it is 'GNU Wget 1.9+cvs-stable (Red
Hat modified)'

How reproducible:
Easily


Steps to Reproduce:
1. run wget --limit-rate http://some.site/some.large.file
2. after it has been running for a while suspend it with Ctrl-Z for a few minutes
3. resume wget with fg
  
Actual results:
wget says the connection has dropped, and says 'reconnecting'
wget then starts using up all available bandwidth instead of only up to the limit

Expected results:
wget should never use up more than the limit-rate bandwidth limit

Additional info:

Comment 1 David Fraser 2005-09-30 14:36:30 UTC
I have checked the RedHat patches and it doesn't seem to be related to any of them.

I had a look at the source code ...
It seems that the code calculates the amount of time it expects to be
downloading the chunk, and sleeps to try and reduce the rate.
It seems the reconnection is therefore "catching up" on the amount of time it
was sleeping (when disconnected) before the reconnection rather than just not
resetting the limit properly.

This doesn't seem to give the desired effect of preventing the bandwidth from
exceeding a certain value.
Would it be possible to change this approach?


Comment 2 Christian Iseli 2007-01-22 10:55:37 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

Comment 3 David Fraser 2007-01-26 10:39:28 UTC
Tested on FC5 and this behaves as I wanted it to - the actual rate of transfer
is still limited as specified after resuming. Marking as resolved


Note You need to log in before you can comment on or make changes to this bug.