-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
limit-rate: When the download speed is limited to 15M per second, it cannot be limited! #2386
Comments
I cannot reproduce with current master (7.59.0 release basically, in particular it includes commit 72a0f62) using a 17MB or 8GB file, downloaded from localhost. |
Repeat the test several times:There is such a situation:
|
You said I tested,Really cannot be reproduce. There is indeed this problem on the network |
I think this happens because |
Due to very frequent updates of the rate limit "window", it could attempt to rate limit within the same milliseconds and that then made the calculations wrong, leading to it not behaving correctly on very fast transfers. This new logic updates the rate limit "window" to be no shorter than the last three seconds and only updating the timestamps for this when switching between the states TOOFAST/PERFORM. Reported-by: 刘佩东 Fixes curl#2386 Closes curl#2388
I did this (Just for download speed test)
Download file size:
This post-submission test(#2371)
Real download time:
real 0m0.384s
(Test a few more times you will find!)I expected the following
Correct performance
Real download time:
real 0m1.123s
Modify the code:
Limit frequent update parameters.what do you think?
(
void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size)
Upload speed limit code should also be modified.)
execute the program:
Real download time:
real 0m1.136s
operating system
The text was updated successfully, but these errors were encountered: