Bug 169634 - wget goes over limit-rate after sleep
wget goes over limit-rate after sleep
Product: Fedora
Classification: Fedora
Component: wget (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
Depends On:
  Show dependency treegraph
Reported: 2005-09-30 10:35 EDT by David Fraser
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: fc5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-26 05:39:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Fraser 2005-09-30 10:35:32 EDT
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:

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 10:36:30 EDT
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 05:55:37 EST
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 ?

Comment 3 David Fraser 2007-01-26 05:39:28 EST
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.