curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Large download speed deviations for CURLOPT_MAX_RECV_SPEED_LARGE in 8.4.0

From: Daniel Stenberg via curl-library <>
Date: Thu, 30 Nov 2023 10:42:00 +0100 (CET)

On Wed, 29 Nov 2023, Dmitry Karpov via curl-library wrote:

> Is it something known or a not previously noticed regression in 8.4.0?

When I looked into this now, I noticed a regression in multi_getsock() which
makes libcurl re-calculate the waiting periods during rate-limiting way too
often. That's wasteful and in my tests it made the limited speed differ more
from the desired value than what it should otherwise do.

This said: I could not see a 20% deviation in my tests. I saw a much smaller
one, that seems to be mostly gone with my fix. So I can't say for sure if this
really is the problem you see or if there is an additional one.

Anyway, my proposed first fix is here:

If you apply that patch, then doing debug outputs in the
Curl_pgrsLimitWaitTime() function is much easier and way less "floody". If you
keep seeing this problem we can then double-check the calculations there to
check that they seem reasonable. They do for me.

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2023-11-30